Good afternoon
I was trying to make a macro that when it finds an image on one of the pages opened it would click a specific point in the screen. And if it didn't find the image to continue to make LAlt + Tab but i can't figure out how to do It.
A simple "Do if find image"
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: A simple "Do if find image"
Try the image recognition wizard. It creates exactly that kind of code for you.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: A simple "Do if find image"
WaitScreenImage>C:\Users\mcorr\Desktop\Sem Título.bmp,0.7,CCOEFF
This is what I get. I wanted to make something like an If so if the image was detected It would click on a spot. But if the image wasn't detected it would press LALT + TAB
This is what I got until now.
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Repeat
Press LALT
Press TAB
Let>WSI_TIMEOUT=1
//Wait for
WaitScreenImage>C:\Users\mcorr\Desktop\Sem Título.bmp,0.7,CCOEFF
If
Until>
This is what I get. I wanted to make something like an If so if the image was detected It would click on a spot. But if the image wasn't detected it would press LALT + TAB
This is what I got until now.
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
Repeat
Press LALT
Press TAB
Let>WSI_TIMEOUT=1
//Wait for
WaitScreenImage>C:\Users\mcorr\Desktop\Sem Título.bmp,0.7,CCOEFF
If
Until>
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: A simple "Do if find image"
Use FindImagePos. If using the wizard use the FIRST option - to FIND position of image. That returns the position of the image and adds code to click on it ...
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?