I have written two functions in an autohotkey script (fun1 and fun2). What I need to do now, is bind function fun1 to when the Pause key is pressed down, and bind the function fun2 to when the Pause key is released. This way I could hide all windows by holding down Pause, and then bring the windows back up when I release Pause (just an example, not my actual objective).

How can I do that in Autohotkey?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

You could compile your .ahk scripts as .exe. Then have

pausedown::C:\fun1.exe

pauseup::C:\fun2.exe

(not sure of the key up/down syntax)

More info on .akh to .exe: autohotkey- ahk2exe

link|improve this answer
Actually, compiling them is unnecessary. I already defined them as functions. My question regarded specifically to the key up/down syntax. I wasn't finding it in the manual, so I asked here. Eventually I found a couple examples online, and it's exactly what you said except there's a blank space between "pause" and "up/down". – Bruce Connor Nov 9 '10 at 11:12
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.