Jump to content

Allowing Users to Set Hotkeys


Drew
 Share

Recommended Posts

I guess that you can do something like this:

$key = InputBox("HotKeySet","Type which key you want to use as HotKey","q")

HotKeySet($key, "Terminate")
Func Terminate()
    Exit 0
EndFunc

while 1
    MsgBox(0,"Running","Press the button your defined before to Exit",2)
WEnd

You could make it in a better way, but this is the simple way.. just an example :D

EDIT: The smarter way is to read about this in the help file _IsPressed - then the user don't have to type it in the inputbox. You can see the ID's for the keys in the Misc.au3

Edited by newbiescripter
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...