mrnoob Posted March 25, 2006 Posted March 25, 2006 I'm trying to execute a Funciton directly after a keypress, like so: Do Sleep(100) Until "F button is pressed" Pressing F activates the function. I know its possable, but I couldnt find any command in the help or forum search
=sinister= Posted March 25, 2006 Posted March 25, 2006 (edited) HotKeySet("{F}", "Stop") Dim $Go $Go=1 While $Go==1 Sleep(100) Wend Func Stop() $Go=0 Endfunc While 1 Sleep(1000);Reduces CPU Usage Wend Edited March 25, 2006 by =sinister=
greenmachine Posted March 25, 2006 Posted March 25, 2006 (edited) Use _IsPressed. It's in the beta helpfile. That's if you don't want a hotkey... hotkeys are more accurate. Edited March 25, 2006 by greenmachine
mrnoob Posted March 25, 2006 Author Posted March 25, 2006 Ahh, Thanks very much to both of you. I ended up using _Ispressed as it better suited my needs. Ill have to remeber the Beta help book next time.
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