mgh2468 Posted January 24, 2005 Share Posted January 24, 2005 I know this may be simple to some people. But how do I loop the following until I choose no?? Autoit3 does not have a goto and am not as familiar with the new loop commands. ;Start $shutdown = InputBox("shutdown", "Enter just the workstation number (ex. 009)",) $ws = '\\ws' & $shutdown $Arguments = '-u administrator -p password_HERE -d shutdown -f -m "This computer will shutdown in 30 seconds!" -l 30 -x' RunWait(@Comspec & " /c " & "beyondexec.exe " & $WS & " " & $Arguments,"") $answer = MsgBox(4, "Shutdown more", "Shutdown more PC's???") MsgBox(4096, "AutoIt", "OK. Bye!") Exit EndIf ;end Link to comment Share on other sites More sharing options...
CyberSlug Posted January 24, 2005 Share Posted January 24, 2005 Do ; shutdown code goes here $answer = MsgBox(4, "Shutdown more", "Shutdown more PC's???") Until $answer = 7;return value of 7 equals NO MsgBox(4096,"AutoIt", "Bye Bye") Exit Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
DirtyBanditos Posted January 24, 2005 Share Posted January 24, 2005 (edited) I know this may be simple to some people. But how do I loop the following until I choose no??Autoit3 does not have a goto and am not as familiar with the new loop commands.;Start$shutdown = InputBox("shutdown", "Enter just the workstation number (ex. 009)",)$ws = '\\ws' & $shutdown$Arguments = '-u administrator -p password_HERE -d shutdown -f -m "This computer will shutdown in 30 seconds!" -l 30 -x'RunWait(@Comspec & " /c " & "beyondexec.exe " & $WS & " " & $Arguments,"")$answer = MsgBox(4, "Shutdown more", "Shutdown more PC's???") MsgBox(4096, "AutoIt", "OK. Bye!") ExitEndIf;end<{POST_SNAPBACK}>Hello this i sfrom the help.chm.exe i hope thi shelp you out! For $i = 5 to 1 Step -1 MsgBox(0, "Count down!", $i) Next MsgBox(0,"", "Blast Off!")$i = 0 While $i <= 10 MsgBox(0, "Value of $i is:", $i) $i = $i + 1 WEnd$i = 0 Do MsgBox(0, "Value of $i is:", $i) $i = $i + 1 Until $i = 10 Edited January 24, 2005 by DirtyBanditos Link to comment Share on other sites More sharing options...
mgh2468 Posted January 24, 2005 Author Share Posted January 24, 2005 Do ; shutdown code goes here $answer = MsgBox(4, "Shutdown more", "Shutdown more PC's???") Until $answer = 7;return value of 7 equals NO MsgBox(4096,"AutoIt", "Bye Bye") Exit<{POST_SNAPBACK}>Cool This works great. The ones from the help file only loop until a certian value is reached.I understand Do... While better now. 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