Jump to content
Sign in to follow this  
kana

Changing HotKeySets

Recommended Posts

kana

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

Share this post


Link to post
Share on other sites
seandisanti

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

Share this post


Link to post
Share on other sites
AdmiralAlkex

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

Share this post


Link to post
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
Sign in to follow this  

×