Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Thursday, February 16, 2006

AutoHotKey rocks (Windows macro recorder)

I wanted Paint to open with the circle tool, configured with red paint and a thick line. Unfortunately Paint always starts with the select tool, black paint, and a thin line.

AutoHotKey to the rescue. This freeware (pricelessware actually) Windows macro recorder recorded my launching the program, clicking the circle tool, clicking the thick line setting, and clicking the red paint. I also created a Run shortcut for it, so all I do is type "Win-R pai" and Paint appears, preconfigured.

Here's the script generated by AutoHotKey:

Run, mspaint
WinWait, untitled - Paint,
IfWinNotActive, untitled - Paint, , WinActivate, untitled - Paint,
WinWaitActive, untitled - Paint,
MouseClick, left, 16, 196
Sleep, 100
MouseClick, left, 37, 290
Sleep, 100
MouseClick, left, 74, 830
Sleep, 100
MouseClick, left, 16, 243
Sleep, 100

0 Comments:

Post a Comment

<< Home