Cor Posted November 10, 2006 Posted November 10, 2006 (edited) sorry posted twice I want to run a function if only the numbers 1 to 24 are pressed on the keyboard. Tried Hotkey but could only accept single numbers I searched but cannot find a way to do this. Needed for guitar TAB Notation input thanks grCor Edited November 10, 2006 by Cor gr.Corhttp://www.ready4music.com35+ programs for ...
FuryCell Posted November 10, 2006 Posted November 10, 2006 (edited) This should give you a general idea of how to do that. Global $Buffer For $X = 0 To 9 HotKeySet($X, "KeyHandler") Next While 1 Sleep(100) WEnd Func KeyHandler() $Buffer &= @HotKeyPressed If StringLen($Buffer) = 3 Then $Buffer = @HotKeyPressed Return EndIf If StringLen($Buffer) <> 2 Then Return If $Buffer >= 1 And $Buffer <= 24 Then MsgBox(0, "Event", $Buffer) EndFunc ;==>KeyHandler If you type any number between 1 and 24 it should fire off a msgbox. It should be noted that to type single digit numbers they need to be prefixed with a zero , eg. "01" Edited November 10, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Uten Posted November 10, 2006 Posted November 10, 2006 It does clutter the information when you .... Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Uten Posted November 10, 2006 Posted November 10, 2006 When you do you can provide .... Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Paulie Posted November 10, 2006 Posted November 10, 2006 When you do you can provide ....Very nice Uten!
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