An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Topic Options
#12487 - 10/17/10 11:13 PM A tip on using UBB tags
artie505 Online


Registered: 08/04/09
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

Top
#12494 - 10/18/10 11:29 AM Re: A tip on using UBB tags [Re: artie505]
Hal Itosis Offline


Registered: 09/03/09
Loc: 10.6.8 (build 10K549)
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]


Edited by Hal Itosis (10/18/10 11:32 AM)

Top
#12495 - 10/18/10 12:14 PM Re: A tip on using UBB tags [Re: Hal Itosis]
artie505 Online


Registered: 08/04/09
> [...] 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

Top
#12498 - 10/18/10 03:10 PM Re: A tip on using UBB tags [Re: Hal Itosis]
dkmarsh Offline

Moderator

Registered: 08/04/09

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

Top
#12499 - 10/18/10 03:40 PM Re: A tip on using UBB tags [Re: dkmarsh]
artie505 Online


Registered: 08/04/09
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


Edited by artie505 (10/18/10 03: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

Top
#12500 - 10/18/10 03:41 PM Re: A tip on using UBB tags [Re: dkmarsh]
dkmarsh Offline

Moderator

Registered: 08/04/09

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

Top
#12502 - 10/18/10 10:42 PM Re: A tip on using UBB tags [Re: artie505]
Hal Itosis Offline


Registered: 09/03/09
Loc: 10.6.8 (build 10K549)
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?]

Top
#12504 - 10/18/10 11:25 PM Re: A tip on using UBB tags [Re: Hal Itosis]
artie505 Online


Registered: 08/04/09
> 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]


Edited by artie505 (10/19/10 12:04 AM)
Edit 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

Top
#12509 - 10/19/10 04:24 AM Re: A tip on using UBB tags [Re: artie505]
dkmarsh Offline

Moderator

Registered: 08/04/09

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

Top
#12510 - 10/19/10 06:01 AM Re: A tip on using UBB tags [Re: dkmarsh]
alternaut Offline

Moderator

Registered: 08/04/09
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

Top
#12511 - 10/19/10 07:14 AM Re: A tip on using UBB tags [Re: alternaut]
artie505 Online


Registered: 08/04/09
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

Top

Moderator:  alternaut, cyn, dkmarsh