Jump to content
Sign in to follow this  
Smiley357

HotKeySet

Recommended Posts

Smiley357

Im trying to set a variable as a hotkey, is it possible? If so, can you give a hint on how to do this or a link for me to read? Im trying to make my own hotkey program. I know others have done this but cant seem to find it. Getting tired of reading forms that dont have anything to do with what I want. There are a billion forms that have hotkey in it.

Example:

Global $test="F2"

HotKeySet("{$test}", "_second")

While 1
Sleep(10)
WEnd

Func _second()
    MsgBox(4096, "test", "second", 10)
EndFunc

Share this post


Link to post
Share on other sites
Zedna

I think it can be done (not tested)

Global $test="F2"

HotKeySet("{" & $test & "}", "_second")

While 1
Sleep(10)
WEnd

Func _second()
    MsgBox(4096, "test", "second", 10)
EndFunc

EDIT: Jos is winner :-)

Edited by Zedna

Share this post


Link to post
Share on other sites
Smiley357

LOL very nice. Worked perfectly. Thanks for the help!!

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  

×