milkman Posted February 8, 2006 Share Posted February 8, 2006 I am a nub at this stuff. How could I use a hotkey to stop a loop? How about terminate a program? Link to comment Share on other sites More sharing options...
rambo3889 Posted February 8, 2006 Share Posted February 8, 2006 Hotkeyset("{ESC}","terminate") Func terminate() exit endfunc My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
greenmachine Posted February 8, 2006 Share Posted February 8, 2006 To terminate a loop, I'd suggest having the hotkey function set a variable to 1, and then back inside the loop, have the condition that if the variable is 1, exitloop. Example: HotKeySet ("{ESC}", "SetVarToOne") Global $SpecialVar = 0 While 1 sleep (100) If $SpecialVar = 1 Then Exitloop Wend Func SetVarToOne() $SpecialVar = 1 EndFunc Link to comment Share on other sites More sharing options...
Valuater Posted February 8, 2006 Share Posted February 8, 2006 (edited) I am a nub at this stuff. How could I use a hotkey to stop a loop? How about terminate a program?help has a great example exactly as you have requested..go to Help and search the "topics" for "Pause" ..You will see HOTKEY open that oneAND/ORTake a look at "Welcome to AutoIt 1-2-3" .. herehttp://www.autoitscript.com/forum/index.php?showtopic=21048#This Interactive Demo has lots of DemonstrationsEnjoy!!!8) Edited February 8, 2006 by Valuater 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