Image recognition help

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
fiend1182
Newbie
Posts: 4
Joined: Mon Sep 29, 2008 5:25 am

Image recognition help

Post by fiend1182 » Mon Sep 29, 2008 5:36 am

I need to create a macro that will click a button on a web page, then look for another specific button to appear. If the 2nd button appears I need to click it, if not I want to go back and click the original button and repeat from there.

I'm guessing the easiest way to do this would be with Image Recognition but I'm having a little trouble getting started.

I have a little but not much programming knowledge... Yes I am a n00b.

Any help would be greatly appreciated.

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

Post by Marcus Tettmar » Mon Sep 29, 2008 7:53 am

It's pretty easy to do what you want to do with Image Recognition. Start with this article:

http://www.mjtnet.com/blog/2007/02/20/h ... cognition/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

fiend1182
Newbie
Posts: 4
Joined: Mon Sep 29, 2008 5:25 am

Post by fiend1182 » Tue Sep 30, 2008 12:19 am

Thanks for the reply. That got me going in the right direction.

My new question is how do I send it back to click the original button if the second button is not found.

I basically need it to click button 1 until button 2 appears, once button 2 appears it needs to be clicked, then repeat.

Thanks

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

Post by Marcus Tettmar » Tue Sep 30, 2008 7:47 am

Use a loop. Use If and Goto to jump back to a label at the top of the script.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

fiend1182
Newbie
Posts: 4
Joined: Mon Sep 29, 2008 5:25 am

Post by fiend1182 » Tue Sep 30, 2008 5:42 pm

Thanks again for the help.

I still can't figure out how to click the button if it shows up and return to the top of the script if it doesn't.

fiend1182
Newbie
Posts: 4
Joined: Mon Sep 29, 2008 5:25 am

Post by fiend1182 » Tue Sep 30, 2008 9:47 pm

If>imgs>0 (means if image shows up)

What means if image doesn't show up?

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

Post by Marcus Tettmar » Wed Oct 01, 2008 1:59 pm

imgs would be 0
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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