Jump to content

Changing HotKeySets


kana
 Share

Recommended Posts

How do you make it so a HotkeySet would run a different function?

you specify what function you want it to run as the second parameter in the function call; if you mean you want to re-use it, then just unassign it first by calling hotkeyset(key,"") then reassign
Link to comment
Share on other sites

You don't have to remove the old hotkey, you can just set directly:

HotKeySet("a", "_a")

While 1
    Sleep(10)
WEnd

Func _a()
    MsgBox(0, "", "A")
    HotKeySet("a", "_b")
EndFunc

Func _b()
    MsgBox(0, "", "B")
EndFunc
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...