Multiple WaitScreenImage's

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Multiple WaitScreenImage's

Post by Sam71 » Wed Mar 20, 2019 4:19 am

Hi,
I wish my script to react to various images that appear. I was reading up on events and loops but am still perplexed by the syntax and where it goes.

Code: Select all

SetFocus>Test
//Wait for 
WaitScreenImage>%BMP_DIR%\image_1.bmp,0.7,CCOEFF
HoldKey>s,50,0
Wait>1.000
HoldKey>v,50,0
Wait>1.000
HoldKey>s,50,0
Wait>1.000
HoldKey>a,50,0
Wait>1.000
HoldKey>g,50,0
Wait>1.000
HoldKey>t,50,0
Wait>1.000

//Wait for 
WaitScreenImage>%BMP_DIR%\image_3.bmp,0.7,CCOEFF
HoldKey>v,50,0
Wait>2.000
HoldKey>v,50,0
Wait>1.000
endif
Help is most appreciated.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Multiple WaitScreenImage's

Post by Marcus Tettmar » Wed Mar 20, 2019 1:19 pm

Use multiple FindImagePos commands in a loop.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Re: Multiple WaitScreenImage's

Post by Sam71 » Wed Mar 20, 2019 1:29 pm

Marcus Tettmar wrote:
Wed Mar 20, 2019 1:19 pm
Use multiple FindImagePos commands in a loop.
Hi Marcus, Well that seems simple enough!. I just needed a nudge in the right direction with this one. Since I'm in Australia I'll have to give it a go in the morning.

Thank you for your expert advice.

Sam

User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Re: Multiple WaitScreenImage's

Post by Sam71 » Thu Mar 21, 2019 12:58 pm

Marcus Tettmar wrote:
Wed Mar 20, 2019 1:19 pm
Use multiple FindImagePos commands in a loop.
This worked perfect, thanks again Marcus!.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts