Sign in to follow this  
Followers 0
ExSellerate

Need help with loop

2 posts in this topic

I have a macro that uploads an email address to a Drip campaign manager. For every email address a dialog box opens and I have to click OK and close the box before the next email address will upload. Have you ever had to click OK 500 times in a row? The following script will close the dialog box one time. I want to loop this script until hell freezes over so everytime the dialog box opens it closes automatically.

This works one time:

; Wait until Swiftpage email address upload confirmation window opens

WinWaitActive("[CLASS:#32770]")

; Close window by sending "Enter" to keyboard

Send("{ENTER}")

This is my feeble attempt to loop the script for the next 100 years (until 1/1/2111)

DO

; Wait until Swiftpage email address upload confirmation window opens

WinWaitActive("[CLASS:#32770]")

; Close window by sending "Enter" to keyboard

Send("{ENTER}")

Until _Now = "01/01/2111

I know there must be a better way to keep this script active - Ideas?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Something like this will do, just did something similar for myself the other day

While 1
WinWaitActive("[CLASS:#32770]")
Send("{ENTER}")
WEnd

Compile to .exe and let that puppy sit in the background and do it's work

Edited by dufran3

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
Sign in to follow this  
Followers 0