Originally Posted By: lectric
I have to interject that I use both Autohotkey and Strokeit to fill my macro needs. Both are excellent programs, and are easily programmed.
Those are interesting programs, particularly Strokeit, but neither one fits my needs.

Strokeit seems to substitute mouse action for keyboard, instead of the other way around. Very clever idea, but I usually need to do just the opposite.

AutoHotkey is much more powerful and versatile than my AnyKey keyboard, but "easily programmed" is a bit of a misnomer, at least compared to AnyKey.

To create a new script:

1. Download and install AutoHotkey.
2. Right-click an empty spot on your desktop or in a folder of your choice.
3. In the menu that appears, select New -> AutoHotkey Script. (Alternatively, select New -> Text Document.)
4. Type a name for the file, ensuring that it ends in .ahk. For example: Test.ahk
5. Right-click the file and choose Edit Script.
6. On a new blank line, type the following: #space::[your script here]
7. Save and close the file.
8. Double-click the file to launch it. A new icon appears in the taskbar notification area.
9. To exit or edit the script, right-click the green "H" icon in the taskbar notification area.


So, to create and run a macro with AutoHotkey you have to transfer from keyboard to mouse and back a minimum of three times. Just to run an existing macro will require at least one transition. This would not work well for me the way I use macros. For example, to type the Spanish verb for "he is" I type está, that is, e, s, t, and ctrl-a because I have ctrl-a reprogrammed in my keyboard to be "alt-160". With AutoHotkey, I would type e, s, t, and then drag out the mouse, bring up Windows Explorer, find and open the directory with my *.ahk macros, scroll down to the one named "a with accent grave.ahk" (unless I were running Linux, then it would have to be "a_with_accent_grave.ahk" smile ), double click on the file, then close the file, close the directory, close Windows Explorer, and resume typing. This does not seem optimal to me.

To program my keyboard, I press the "ProgrmMacro" key, press the key the macro will be stored in (ctrl-a in the above example), record my macro, and press the ProgrmMacro key again to stop the recording. After that, any time I press the "stored in" key, the macro runs unless the "Suspend Macro" key is toggled in which case all macros are disabled.

I use this "instant programming" constantly for things like, oh, say I was in an Excel spreadsheet and for some silly reason needed to copy a cell, paste it into a new location two columns over and one row down, make the pasted cell bold with a border around it, and repeat this operation on every fifth row. I just now programmed my AnyKey to do this and it took me 19.7 seconds. I usually "macro-ize" any operation that repeats three or more times and I use the "/" key on the numeric keyboard for these throwaway macros since it is located adjacent to the "ProgrmMacro" key.

On the off chance that anyone is anal enough to want to know what a macro to copy a cell and paste it two columns over and one row down, make it bold with border, and repeat looks like...

Ctrl-PrgrmMacro

/
Ctrl-C
Tab
Tab
Down-Arrow
Ctrl-V
Ctrl-B
Ctrl-1
B
Tab
Ctrl-O
Enter
Home
Enter
Enter
Enter
Enter

ProgrmMacro

will do the trick. Note that all of this, programming and running the macro, was done without touching the mouse.

I'm kinda weird, I know, but what can I say? It works for me.

tanstaafl.
_________________________
"There Ain't No Such Thing As A Free Lunch"