auto color clicker

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Recoda
Newbie
Posts: 5
Joined: Thu Dec 29, 2005 7:12 pm

auto color clicker

Post by Recoda » Sat Jan 28, 2006 9:25 am

Hi im looking for a Color Clicker where i can choose the color he must click (pixel color pick so not color on buttons or watever)
and then i can start it and he clicks auto on the color(s) i choose.
this is small but i have not enough exp. to do it :(
Can i make one in msched? And can someone give me the code to it ?


// thx

Recoda
Newbie
Posts: 5
Joined: Thu Dec 29, 2005 7:12 pm

Post by Recoda » Sat Jan 28, 2006 1:27 pm

or how will this code look like?

Scanning for a color and if the color was found its press on the color and make a loop so its heapend all the time

Recoda
Newbie
Posts: 5
Joined: Thu Dec 29, 2005 7:12 pm

Post by Recoda » Sat Jan 28, 2006 2:02 pm

ok i found this one
but its to slow plz how can i fix the speed to maximum?


//Lines are from the sample I submitted to the forum
//This untested macro should allow you to see mouse movement and show
//message window displaying the X,Y values of the cursor.

//1. Define rectangle coordinates that includes pixel, ie TL-X,Y=30,30; TR-X,Y=60,30; BL-X,Y= 30,80; BR-X,Y=60,80.
//Provide Message Box to track real time progress.
Let>MSG_STAYONTOP=1

//Define Top Left (TL) position
Let>XTL=30
Let>YTL=30

//Define Rectangle dimensions
Let>Width=300
Let>Height=500

Let>X=%XTL%
Let>Y=%YTL%
Let>XMax=%X%+%Width%
Let>YMax=%Y%+%Height%

//Define color to look for
Let>FindColor=ffd79d

//2. Move mouse to TL-X,Y
//Start Loop
Label>FindPixel
MouseMove>%X%,%Y%

//3. Get Pixel Color
Label>MatchColor
GetPixelColor>%X%,%Y%,ThisColor

//4. If Matches, Mouse LClick and continue to run desired routine.
If>%ThisColor%=%FindColor%,Continue,NextX

//5. If not match, Increase X by 1
Label>NextX
Let>X=%X%+1

//6. If X>60, then x=30, Increase Y by 1
If>%X%>%XMax%,NextRow
Goto>NextSpot

Label>NextRow
Let>X=%XTL%
Let>Y=%Y%+1

//7. If Y>80, do something else and test again in 8 minutes
If>%Y%>%YMax%,NotFound,NextSpot

Label>NotFound
MessageModal>Color %FindColor% not found in this area
....Exit macro, do other things for 8 minutes and call macro again.

Goto>End

//8. Move mouse to X,Y
//9. Repeat loop
Label>NextSpot
Message>Moving mouse to X=%X% - Y=%Y%
Goto>FindPixel

Label>Continue
LClick
MessageModal>Color %FindColor% was found at X=%X% - Y=%Y%
...Do other things in the script

Label>End

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