Find an image starting at the bottom of the screen

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
JasonP
Newbie
Posts: 6
Joined: Mon Sep 22, 2014 11:38 pm

Find an image starting at the bottom of the screen

Post by JasonP » Tue Sep 23, 2014 10:34 pm

I am trying to find a way to locate the instance of an image that is closest to the bottom of the window instead of from the top down.

I found a script that will all me to scroll to the bottom of the window but it is still possible that I would have two instances of the same image and I need to find the instance closest to the bottom of the window and click on it.

Any help would be greatly appreciated.

Thanks,

Jason

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

Re: Find an image starting at the bottom of the screen

Post by Marcus Tettmar » Mon Sep 29, 2014 5:20 pm

If you're using the EXACT match method you will get an array of matches. the array starts from top left to bottom right, so the closest to bottom right will be the last entry in the array.

If using CCOEFF you get the most likely match, so you'd need to first define the area to search. You could search areas of the screen, a rectangle at the bottom. A loop if needed, going up the screen each time.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Find an image starting at the bottom of the screen

Post by mightycpa » Sat Oct 18, 2014 1:21 am

Have you tried doing a CTRL-ALT-Down Arrow first? I haven't tried what you're asking, but it just might work.

CTRL-ALT-Up Arrow reverses the effect. :lol:
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

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