naru Posted July 30, 2017 Posted July 30, 2017 (edited) I have autoit script like this : Opt("TrayAutoPause",0) $var = Ping("www.google.com") If not @error Then WinActivate ( "Bill report") ControlClick ( "Bill report", "", "btnSave") ControlSend ( "Bill report", "", "btnSave]", "{enter}") WinWait("Verification Number") If WinExists ("Length Check") Then ControlClick("Length Check", "", "[CLASS:Button; INSTANCE:1]") ControlSend("Verification Number::", "", "txtNumber", "{backspace}") ControlClick("Verification Number", "", "[Next]") ControlSend("[Class:Window.8.app.0.556534a]", "", "[NAME:PictureBox2]", "{tab}") WinWaitClose(" Check Utility ") RunWait("rasdial /disconnect", "", @SW_HIDE) ; Stop connect from start Exit EndIf WinWait("Check Utility", "", 10) WinActivate("Check Utility ::") ControlSend("[Class:Window.8.app.0.556534a]", "", "[NAME:PictureBox2]", "{enter}") RunWait("rasdial Internet", "", @SW_HIDE) ; Connect again if Winexists ("Bill not found") then Controlclick(":Ok:") MouseClick ("left", 295, 230, 1, 5) ;repeat script if not winexists ("Bill not found") then exit (Don't repeat script) Exit Else #include <MsgBoxConstants.au3> MsgBox($MB_TOPMOST, "Connection Status", "Internet is not Connected") Exit Endif How can i repeat my script when Winexsits ("Bill not found") then Controlclick(":Ok:") MouseClick ("left", 295, 230, 1, 5) ;repeat script here Edited July 30, 2017 by Nareshm
Developers Jos Posted July 30, 2017 Developers Posted July 30, 2017 Open the Helpfile and Search for: "Loop Statements" Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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