MouseMove to Pixel Color

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
bb42392
Newbie
Posts: 3
Joined: Tue Mar 18, 2008 9:12 pm

MouseMove to Pixel Color

Post by bb42392 » Fri Mar 21, 2008 4:42 pm

Hi,
I just started using Macro Scheduler, and so far I've had no issues. However, recently I wanted to try writing a script involving mouse moving and clicking on certain areas of the screen. I know how to find the pixel color of these areas, but is it possible to make the mouse move to this pixel color once it has been found and then click on it? I've already tried using coordinates to move the mouse to these areas, but it doesn't work because the background screen environment is constantly changing and moving around.
Thanks for all your help

durexlw
Newbie
Posts: 18
Joined: Mon Mar 17, 2008 1:19 pm

Post by durexlw » Mon Mar 24, 2008 1:14 pm

Can you state what you want to do exactly?

The screen-recognition functions should give you a headstart

bb42392
Newbie
Posts: 3
Joined: Tue Mar 18, 2008 9:12 pm

Post by bb42392 » Tue Mar 25, 2008 1:47 am

I want it to search for a pixel color or a certain picture on the screen. Once it has found this object or pixel I want it to recognize it and move the mouse to that object. Once it has moved there I want it to left click, and then repeat. Over and over again.

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

Post by Marcus Tettmar » Tue Mar 25, 2008 7:19 am

To search for an object use FindImagePos.

To search for just a pixel color either use GetPixelColor in a nested loop (one for X and one for Y) or use the FindColor library which was designed for just this process:

Download the FindColor library at:
http://www.mjtnet.com/plugins.htm

A search also reveals:
http://www.mjtnet.com/forum/viewtopic.php?=&p=15078

http://www.mjtnet.com/forum/viewtopic.p ... &view=next
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

Post by idiot » Thu Apr 03, 2008 4:00 am

check out all posts by me i do tons of stuff like this and have asked just about every question you will if not more so im sure theres an aswer for you in one of em :lol:
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!

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