boltc Posted November 8, 2006 Share Posted November 8, 2006 $hotkeys = StringSplit("1,2,3,4,5,6,7,8,9,0", ",") For $number = 0 to 10 HotKeySet($hotkeys[$number], "_show") Next Func _show() MsgBox (4096, "test", $hotkeys) EndFunc i want to show in the msgbox what hotkey is pushed... Can someone help me? (the code above dont work:)) Link to comment Share on other sites More sharing options...
jvanegmond Posted November 8, 2006 Share Posted November 8, 2006 (edited) $hotkeys = StringSplit("1,2,3,4,5,6,7,8,9,0", ",") For $number = 1 to $hotkeys[0] ; Use the variabele end so you can easily add more numbers to the Hotkey String. HotKeySet($hotkeys[$number], "_show") Next ; The main loop will prevent the script from exiting immediately. While 1 Sleep(50) ; A little bit of sleep to prevent high CPU usage. Wend Func _show() MsgBox (4096, "test", @HotKeyPressed) ; @HotKeyPressed returns the hot key pressed. :) So this will probably work. EndFuncGood luck.Edit: Tested and it works.Added comments. Edited November 8, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
boltc Posted November 8, 2006 Author Share Posted November 8, 2006 it works.. thank you very much 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