dannybones Posted August 4, 2008 Share Posted August 4, 2008 I used to use AutoHotKey, which works like this: I double-click on the script file to load it. The first line will read something like: #z:: which means that nothing happens, until I press Windows-z, which makes the script execute. Maybe I'm dumb as a box of rocks, but I can't figure out how to assign a key to make my AutoIt script execute. How do I do so? Been trying all afternoon to figure it out. Thanks! Link to comment Share on other sites More sharing options...
-Ultima- Posted August 4, 2008 Share Posted August 4, 2008 Something like this? HotKeySet("#z", "some_func") Func some_func() ; Perform something ; Unregister hotkey and exit (to make this a one-time thing, comment out otherwise) HotkeySet("#z") Exit EndFunc While 1 Sleep(1000) WEnd [ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ] Link to comment Share on other sites More sharing options...
anixon Posted August 4, 2008 Share Posted August 4, 2008 (edited) I used to use AutoHotKey, which works like this:I double-click on the script file to load it. The first line will read something like:#z::which means that nothing happens, until I press Windows-z, which makes the script execute.Maybe I'm dumb as a box of rocks, but I can't figure out how to assign a key to make my AutoIt script execute. How do I do so? Been trying all afternoon to figure it out. Thanks!HotKeySet("{ESC}", "YourRoutine")Func YourRoutine() Do SomethingEndFuncIf you hit the Esc Key then the YourRoutine will run. Ant.. Edited August 4, 2008 by anixon Link to comment Share on other sites More sharing options...
dannybones Posted August 4, 2008 Author Share Posted August 4, 2008 Hey, awesome - you guys are great! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now