anyways Posted July 1, 2007 Posted July 1, 2007 (edited) What function i should use to repeat a script when it reaches the end (or when its done)? and is there a way to tell autoit to stop when lets say i press esc? Edited July 1, 2007 by anyways
Kogmedia Posted July 1, 2007 Posted July 1, 2007 What function i should use to repeat a script when it reaches the end (or when its done)? and is there a way to tell autoit to stop when lets say i press esc? #Include <Misc.au3> #Include <Date.au3> While Not _IsPressed ( "1B" , 'user32.dll' ) ConsoleWrite(@CRLF&_Now()) Wend [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search
Generator Posted July 1, 2007 Posted July 1, 2007 What function i should use to repeat a script when it reaches the end (or when its done)? and is there a way to tell autoit to stop when lets say i press esc?Learn to do Loops HotkeySet("{ESC}","_Quit") HotkeySet("{PAUSE}","_Func") Global $Bool=0 While 1 Sleep(1) WEnd Func _Quit() Exit EndFunc Func _Func() $Bool=Not $Bool While $Bool ;Do stuff WEnd EndFunc
anyways Posted July 1, 2007 Author Posted July 1, 2007 (edited) ok, you both showed me a way to end the script by clicking esc, but u didnt tell me what function to use if i want the script to repeat itself when its done? Edited July 1, 2007 by anyways
Kogmedia Posted July 1, 2007 Posted July 1, 2007 #Include <Misc.au3> While Not _IsPressed ( "1B" , 'user32.dll' ) ;Your Program Goes in the HERE! Wend [font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search
i542 Posted July 1, 2007 Posted July 1, 2007 Global $RepeatScript = 2 ;How many times your script will repeat. 1 = once. HotKeySet("{ESC}","_Exit") ;This makes the script exit on ESC For $i = 1 To $RepeatScript MsgBox(0,"","This is " & $i & ". message box!") ;wow what a discovery =) ;Rest of your script goes here Sleep(500) ;Gives user a chance to quit - if you will use multi lines then delete this command =) Next ;Here goes something if you want after the script is repeated. Func _Exit() ;This is the exit command ;Here goes something if you want before exit command Exit EndFunc Not tested I can do signature me.
anyways Posted July 1, 2007 Author Posted July 1, 2007 (edited) #Include <Misc.au3> While Not _IsPressed ( "1B" , 'user32.dll' ) ;Your Program Goes in the HERE! Wend lol i figured that out later, thanks though it works, btw is there a default key on the keyboard to pause or stop the autoit script? Edited July 1, 2007 by anyways
BullGates Posted July 1, 2007 Posted July 1, 2007 lol i figured that out later, thanks though it works, btw is there a default key on the keyboard to pause or stop the autoit script?In SciTE I see F5 to run, and Ctrl+break to Stop Executing. [topic="51913"]Restrict USB Storage usage to group membership[/topic] * [topic="48699"]Using nircmd library[/topic] * Some admin notes
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