Home
Posted By: artie505 A tip on using UBB tags - 10/18/10 06:13 AM
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
Posted By: Hal Itosis Re: A tip on using UBB tags - 10/18/10 06:29 PM
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]
Posted By: artie505 Re: A tip on using UBB tags - 10/18/10 07:14 PM
> [...] 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?
Posted By: dkmarsh Re: A tip on using UBB tags - 10/18/10 10:10 PM

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

Posted By: artie505 Re: A tip on using UBB tags - 10/18/10 10:40 PM
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
Posted By: dkmarsh Re: A tip on using UBB tags - 10/18/10 10:41 PM

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.
Posted By: Hal Itosis Re: A tip on using UBB tags - 10/19/10 05:42 AM
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?]
Posted By: artie505 Re: A tip on using UBB tags - 10/19/10 06:25 AM
> 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]
Posted By: dkmarsh Re: A tip on using UBB tags - 10/19/10 11:24 AM

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.
Posted By: alternaut Re: A tip on using UBB tags - 10/19/10 01:01 PM
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.
Posted By: artie505 Re: A tip on using UBB tags - 10/19/10 02:14 PM
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.
© FineTunedMac