Problems with pixelcolor

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Problems with pixelcolor

Post by Marcdk » Sat Sep 22, 2007 10:29 pm

Hey everyone!

- I just downloadet the trial version of macro scheduler ;)


I have problems with my script.. here it is:

Label>start
MouseMove>735,619
wait>2.0
Lclick
wait>0.5
Let>Invited=6905929
Let>color=Invited
Repeat>color
GetPixelColor>453,126,color
If>color=Invited
Goto>Invited
else>end
Goto>start
Label>end

Label>Invited
MouseMove>415,124
wait>0.5
Lclick
wait>0.5
MouseMove>412,156
wait>0.5
Lclick
Goto>Invited
Label>end



As u can see i tried to use pixelcolor, but i cant figuring out how its works :/

This script is for a game, and i need the bot to detect when i am invited by a person in the game.. I just took a random place in the game, and found the pixelcolor, and tried to make the script,
oh well, but it doesn't work, any help please? :)

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Sun Sep 23, 2007 2:04 pm

Here are 2 examples that should at least get you started.

This example loops until the invite color is visible, jumps to the Invite label and goes back to the start loop.

Code: Select all

Let>InvitedColor=6905929
Label>Start Loop
MouseMove>735,619
wait>2.0
Lclick
wait>0.5
GetPixelColor>453,126,color
If>color=InvitedColor,Invited
Goto>Start Loop

Label>Invited
MouseMove>415,124
wait>0.5
Lclick
wait>0.5
MouseMove>412,156
wait>0.5
Lclick
wait>1
Goto>Start Loop
This example waits for the Invite color, clicks what ever button you want it to click when the color is visible and continues to wait for the next invite color without breaking out of the start loop.

Code: Select all

Label>Start Loop
MouseMove>735,619
wait>2.0
Lclick
wait>0.5
GetPixelColor>453,126,color
If>color=6905929
//Start Invited
MouseMove>415,124
wait>0.5
Lclick
wait>0.5
MouseMove>412,156
wait>0.5
Lclick
wait>1
//End Invited
endif
Goto>Start Loop

Marcdk
Junior Coder
Posts: 36
Joined: Sat Sep 22, 2007 10:16 pm

Post by Marcdk » Wed Sep 26, 2007 6:55 pm

thx man, its working now :)

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