How to force FindImagePos to search from top to bottom

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
tycoon
Newbie
Posts: 2
Joined: Sun Jun 15, 2008 11:06 pm

How to force FindImagePos to search from top to bottom

Post by tycoon » Sun Jun 15, 2008 11:14 pm

Hello I'm newbie to Macro Scheduler, but even after one day of using it I think this soft is great!

Unfortunately I've got problem using function FindImagePos. I've found it search for all occurrences of image from left to right. But I would like it to search from top to bottom.

Does somebody know is it possible?

Thanks if advance for your help

Maciej Majchrowski

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

Post by Marcus Tettmar » Mon Jun 16, 2008 7:23 am

FindImagePos scans from top left to bottom right. It stores ALL matches in an array. You can read through that array in whatever order you like.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

tycoon
Newbie
Posts: 2
Joined: Sun Jun 15, 2008 11:06 pm

Post by tycoon » Mon Jun 16, 2008 3:40 pm

Thanks for reply Marcus,

but to be honest I completely don't know how to go through arrays, especially using Y variable as sort order.

The only syntax I'm familiar with is:
FindImagePos>U:\data\l2.bmp,SCREEN,16,1,X,Y,NumFound

If>NumFound>0
MouseMove>X_0,Y_0
GoSub>FetchOne
Endif

If>NumFound>1
MouseMove>X_1,Y_1
GoSub>FetchOne
Endif

etc.
Could you give me some hints?

Thanks in advance
--
Maciej Majchrowski

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