Nareshm

How to reprat my autoit script ?

2 posts in this topic

#1 ·  Posted (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 by Nareshm

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now