Image recognition in Gmail

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Bob08
Newbie
Posts: 1
Joined: Thu Aug 21, 2008 1:49 pm

Image recognition in Gmail

Post by Bob08 » Thu Aug 21, 2008 2:02 pm

I've followed the steps provided in this tutorial but it's not working.

I want to make a script to click on this button
Image


Here's the code.

Code: Select all

GetScreenRes>,sX, sY
ScreenCapture>0,0,sX,sY,D:\Documents and Settings\username\Desktop\Macro Scheduler\screen.bmp
FindImagePos>D:\Documents and Settings\username\Desktop\Macro Scheduler\new2.bmp,D:\Documents and Settings\username\Desktop\Macro Scheduler\screen.bmp,20,1,XPos,YPos,imgs
If>imgs>0
  MouseMove>XPos_0,YPos_0
   LClick
Endif
Anything wrong?

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

Post by Marcus Tettmar » Fri Aug 22, 2008 7:54 pm

Works fine for me. Here's my code:

Code: Select all

FindImagePos>d:\gmailbtn.bmp,SCREEN,0,1,Xs,Ys,NumFound
If>NumFound>0
  MouseMove>Xs_0,Ys_0
  LClick
Endif
I used the Image Capture tool in the Macro Scheduler editor to capture a portion of the image you posted on the forum. Then when I run the above code the cursor moves to the image in your post and clicks 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?

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