iresolver Posted March 11, 2015 Posted March 11, 2015 Hi guy's I need help I can't get my script to loop the way I want I have an app that has popup windows that I want to close with my script based on the window titles and tab through the selection to close the windows down but I don't know how to repeat and make it loop the right way here is my script I would like to make the ('Activation') loop until the ('User account') window pops up the go back to the top of the script again and wait for the ('Activation') windows to popup keep doing that until I end the script. Can anyone help? #RequireAdmin While 1 WinWait ('Activation') If WinActive ('Activation') Then Send('{TAB}{TAB}{TAB}{SPACE}') Sleep(60) EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; If WinWait ('User account') Then Send('{TAB}{TAB}{SPACE}{SPACE}') Sleep(60) Send('{TAB}{TAB}{TAB}{TAB}{SPACE}') ElseIf WinWait ('Activation') Then Send('{TAB}{TAB}{TAB}{SPACE}') EndIf WEnd
JohnOne Posted March 11, 2015 Posted March 11, 2015 Play around. While 1 Sleep(500) If WinExists('Activation') Then WinActivate('Activation') Send('{TAB}{TAB}{TAB}{SPACE}') ; maybe you don't need this now Sleep(60) EndIf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; If WinExists('User account') Then WinActivate('User account') Send('{TAB}{TAB}{SPACE}{SPACE}') Sleep(60) Send('{TAB}{TAB}{TAB}{TAB}{SPACE}') EndIf WEnd AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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