Hello everyone,
Just purchased MS and so far have been really enjoying it. I've run into a stopping point that I can't figure out yet and was hoping one of you has already figured this out.
I'm running a macro that will look for an image and then proceed. At the current time if the image does not appear the macro continues to look for the image. I'd like to set up a timer and if the macro does not detect the image in X time, the script starts over.
Any help would be great. Thanks in advance.
Countdown that will restart script?
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 2
- Joined: Sun Apr 18, 2021 10:34 pm
- Dorian (MJT support)
- Automation Wizard
- Posts: 1415
- Joined: Sun Nov 03, 2002 3:19 am
Re: Countdown that will restart script?
This should do that, and the comments should explain it.
Code: Select all
//start label
Label>start
//Set the timeout (in seconds)
Let>WSI_TIMEOUT=10
//Wait for the image
WaitScreenImage>%BMP_DIR%\image_1.bmp,0.7,CCOEFF
//If none were found after 10 seconds, go to start. If one of more were found, the script will continue.
If>WSI_RESULT<1
Goto>start
Endif
MessageModal...I continued...
-
- Newbie
- Posts: 2
- Joined: Sun Apr 18, 2021 10:34 pm
Re: Countdown that will restart script?
Thank you so much! I'll test this when I get home today.