An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
A tip on using UBB tags
#12487 10/18/10 06:13 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
Maybe I've just been living in blissful ignorance of a widely know fact, but I learned something new tonight...

When I want make text bold, for instance (This works with all front/back tags.), I habitually click on the "B" icon, advance my cursor the requisite three spaces, and type.

Tonight I stumbled on the fact that if I type my text, select it, and then click on "B," the tags will automatically be inserted at the beginning and end of my selected text.

While this is not momentous ordinarily, it's miraculous when I want to change or add formatting down the line, i.e. in the middle of a completed paragraph.

Hope this helps at least one ( wink ) somebody else. smile


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: A tip on using UBB tags
artie505 #12494 10/18/10 06:29 PM
Joined: Sep 2009
Offline

Joined: Sep 2009
True... but this UBB software is still lame, because it releases the selection when we click on that (bold) button. The software used by macosxhints and MacRumors maintains the selection... so we can quickly and easily add more tags (size, color, italics, font, etc), without having to re-select the text again manually. E.g. blue Courier takes but two simple clicks, once the text is selected. [not so here however]

Last edited by Hal Itosis; 10/18/10 06:32 PM.
Re: A tip on using UBB tags
Hal Itosis #12495 10/18/10 07:14 PM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
> [...] it releases the selection [....]

I don't find that it releases the selection, rather that it doesn't extend it to include the additional characters, i.e. if I select 5 characters and the tags add seven, only the first five are selected afterwards.

It's not quite such a pain if you're dealing with the last string you typed, though, because you can command-shift-right arrow to the end of the lengthened string. tongue

And yeah, it is pretty annoying, but why complain about a new toy from jump street?


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: A tip on using UBB tags
Hal Itosis #12498 10/18/10 10:10 PM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

That's why I use scripts for my most frequently-encountered multiple formatting situations, like URL_and_Title.scpt:

Code:
tell application "Safari"
 activate
 set {theURL, theTitle} to {URL of document 1, do JavaScript "document.title" ¬
  in document 1}
 set theText to "[url=" & theURL & "][color:blue]" & theTitle & "[/color][/url]"
 set the clipboard to theText
 display dialog "\"" & theText & "\" has been placed on the clipboard and is ¬
  ready for pasting"
end tell




dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: A tip on using UBB tags
dkmarsh #12499 10/18/10 10:40 PM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
Originally Posted By: dkmarsh
Code:
tell application "Safari"
 activate
 set {theURL, theTitle} to {URL of document 1, do JavaScript "document.title" ¬
  in document 1}
 set theText to "[url=" & theURL & "][color:blue]" & theTitle & "[/color][/url]"
 set the clipboard to theText
 display dialog "\"" & theText & "\" has been placed on the clipboard and is ¬
  ready for pasting"
end tell

That's been option-U on my deuced Mac(hina) for months. (Edit: Except for the "display dialog..." part.)

Edit 2: Thanks again for having posted it. smile

Last edited by artie505; 10/18/10 10:49 PM.

The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: A tip on using UBB tags
dkmarsh #12500 10/18/10 10:41 PM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

More to the point, here's blue_courier.scpt:

Code:
tell application "Safari" to activate
tell application "System Events"
 tell process "Safari"
  keystroke "c" using {command down} --get selected text
 end tell
end tell
set theSelection to the clipboard
set theText to "[color:#3366FF][font:Courier]" & theSelection & "[/font][/color]"
set the clipboard to theText
tell application "Safari" to activate
tell application "System Events"
 tell process "Safari"
  keystroke "v" using {command down} --replace with formatted text
 end tell
end tell

Obviously what's desired is a generalized dialog via which one can select specific formatting to be applied, but I leave that as an exercise either for the reader, or for me on a rainy day. Choosing a color visually might be a problem with this approach.



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: A tip on using UBB tags
artie505 #12502 10/19/10 05:42 AM
Joined: Sep 2009
Offline

Joined: Sep 2009
Originally Posted By: artie505
> [...] it releases the selection [....]

I don't find that it releases the selection, rather that it doesn't extend it to include the additional characters, i.e. if I select 5 characters and the tags add seven, only the first five are selected afterwards.

Perhaps you've never added color, changed the font, increased its size, or added code tags then.

The selection is released in those cases.

[didn't mean to rain on your parade in my previous reply, but honestly... how can you have been posting for so many years and not realized that selecting text and clicking on the bold button would embolden the selection?]

Re: A tip on using UBB tags
Hal Itosis #12504 10/19/10 06:25 AM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
> Perhaps you've never added color, changed the font, increased its size, or added code tags then.

I've added color once, maybe twice, without noticing the release; this is a new experience for me, and all of its aspects haven't had time to sink in.

> how can you have been posting for so many years and not realized that selecting text and clicking on the bold button would embolden the selection?

Just plain never tried. crazy

Edit: And when push comes to shove, the tag buttons are so easy to use that it never occurred to me to look for an alternative. Think about it... When you're first typing text, which is when I mostly enter tags, click, advance three spaces, and type is quicker and easier, for me, anyhow, than type, select, and click.

And as for why it never occurred to me to look for an alternative when dealing with text in the middle of a paragraph... [shrug][/shrug]

Last edited by artie505; 10/19/10 07:04 AM. Reason: To say it right

The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire
Re: A tip on using UBB tags
artie505 #12509 10/19/10 11:24 AM
Joined: Aug 2009
Likes: 3
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 3

Quote:
When you're first typing text, which is when I mostly enter tags...

Maybe that's part of it; I can't speak for Hal, but I do the majority of my formatting after having finished typing the post.



dkmarsh—member, FineTunedMac Co-op Board of Directors
Re: A tip on using UBB tags
dkmarsh #12510 10/19/10 01:01 PM
Joined: Aug 2009
Likes: 1
Moderator
Offline
Moderator

Joined: Aug 2009
Likes: 1
Originally Posted By: dkmarsh
...I do the majority of my formatting after having finished typing the post.

So do I. Moreover, I don't usually compose replies directly in the text entry box, but in TextEdit or similar text editor on computers running OSes other than Mac OS.


alternaut moderator
Re: A tip on using UBB tags
alternaut #12511 10/19/10 02:14 PM
Joined: Aug 2009
Likes: 15
OP Online

Joined: Aug 2009
Likes: 15
Originally Posted By: alternaut
Originally Posted By: dkmarsh
...I do the majority of my formatting after having finished typing the post.

So do I. Moreover, I don't usually compose replies directly in the text entry box, but in TextEdit or similar text editor on computers running OSes other than Mac OS.

I compose my long, complicated posts in TextEdit and enter all necessary UBB tags there...only do cleanup in the FTM reply box.


The new Great Equalizer is the SEND button.

In Memory of Harv: Those who can make you believe absurdities can make you commit atrocities. ~Voltaire

Moderated by  alternaut, cyn, dkmarsh 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.4.33 Page Time: 0.026s Queries: 36 (0.019s) Memory: 0.6271 MB (Peak: 0.7213 MB) Data Comp: Zlib Server Time: 2024-03-29 14:58:28 UTC
Valid HTML 5 and Valid CSS