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