PDA

View Full Version : Forum formatting as you type: one solution



henrik_o
02-05-2008, 02:43 PM
I've been playing around with a nifty little app called AutoHotkey (http://www.autohotkey.com/) in order to on the one hand remote control the Shopbot via a joystick, and on the other to extend/automate SB3 functionality. (You can see the nascent joystick setup here (http://www.talkshopbot.com/forum/show.cgi?tpc=312&post=62796#POST62796))

I realized this app would be ideal for getting around the awkward formatting codes for this forum. The beauty of it is that you can compile scripts into exe files that runs on any computer, without any need for the 'mother application' itself.

The script I've written is (I think?) very easy to use.

In order to get started, you simply download it and doubleclick it. It will show up in the tray (the section in the bottom right corner of your screen) as a green "H" icon.

It works by assigning each type of formatting to a letter, and in order to produce the formatting you type that letter twice (followed by a space) to make the word you just typed display in that format, or you type the letter three times (followed by a space) to give you the formatting code and move the text input cursor so that you can continue to type and what you type will be in that format, until you hit the Right arrow cursor.

Sounds complicated? It isn't. Let's say you want to italicize a word. The assigned letter for italics is "i". Type the word, space, type i+i+ space, and the word you typed will be wrapped in the code for italics. If you want to do this before you typed the word, or for more than one word, you press i+i+i+space and now what you type will be wrapped in the code for italics. When you want non-italic text, you escape the wrap by hitting the Right arrow button (or clicking with the mouse). Still makes no sense? Download the script, doubleclick it and make sure it is running (green "H" icon in the tray on the bottom right of screen), then try out the above. If it still makes no sense, post here or email me.

Basic text formats:

For italicizing the word you just typed, type space i i space (space+i+i+space); for italicizing what you are about to type (and then use Right arrow to stop italicizing) type i i i space (i+i+i+space)

For bold use b+b+space, or b+b+b+space [with details as above]

For fixedtext use f+f+space, or f+f+f+space

For underline use u+u+space, or u+u+u+space

Pictures and attachments

These work the same way, type the letter twice to affect the word you just typed, or three times to affect what you are about to type.

For pictures, use p+p+space to make the word you just typed the title for a picture (you will be prompted for the file when you decide to post), use p+p+p+space to make what you are about to type the title for a picture.

For attachments, use a+a+space to make the word you just typed the title for an attachment (you will be prompted for the file when you decide to post), use a+a+a+space to make what you are about to type the title for an attachment.

Quoting and Links
These work a little bit different.

To quote, if you type q+q+space then what is on the clipboard will be pasted in as the quoted text. So, if you are typing along and want to quote someone, select that text then copy it, then go back and type q+q+space and that part will be quoted, you can continue to type on your response. If you hit q+q+q+space, you will get the quote tags and can then type or paste what you wanted to quote. Try it out.

For linking (lower case L), copy the link location of what you want to link to then hit l+l+space and type your description. There's no three letter (l+l+l) combo for now. Try it out.

Emoticons
These work on the basic oldskool text protocol. The following emoticons are in the script;

: + ) + space for

: + ( + space for

; + ) + space for

: + D + space for

: + O +space for


To download the doubleclickable .exe file, go here (http://www.2shared.com/file/2807556/5f2c0741/talkshopbotcodes.html) and click on the link right of the very small text "Save file to your PC". If you want to download Authotkeys and play with the script, use the link in the beginning of this post to get the app and use this link (http://www.2shared.com/file/2807580/3e1dc39/talkshopbotcodes.html?) to get the uncompiled 'source code' script.

Let me know what you think.

harryball
02-05-2008, 02:52 PM
Thanks Henrik, that look like a cool tool.

Haven't seen you post in a while, glad to know everything is going well.

Robert

henrik_o
02-07-2008, 04:36 PM
Hi Robert!

Been swamped. How are the bathouses coming along? Is anyone still using the meebo chat?

harryball
02-07-2008, 04:38 PM
I'm on Meebo right now. I generally log in to see who is around, but the participation has really dropped off.

Robert