Sign in to follow this  
Followers 0
panthersbball44

pixel search help

2 posts in this topic

hey everyone...im just starting this whole scripting thing and i dont understand the pixel search

im wanting it to search a certain area for a color and if it finds it then to left click on it then search again for a different color in the same area because the screen will change if the first item is clicked...and if one of the colors arent found i want the mouse to move and click somewhere else...can u help? the coordinates and colors for the two locations are as follows

1st click ---- pixelsearch (841, 508, 850, 513, 13816329)

2nd click----- pixelsearch (841, 508, 850, 513, 13088393)

if it doesnt find either of the colors i want it to move to (870,360) and left click then move to (845,510) and start the pixel searchs and everything again....please some1 write this script or give me some major pointers! thanks

Share this post


Link to post
Share on other sites



hey everyone...im just starting this whole scripting thing and i dont understand the pixel search

im wanting it to search a certain area for a color and if it finds it then to left click on it then search again for a different color in the same area because the screen will change if the first item is clicked...and if one of the colors arent found i want the mouse to move and click somewhere else...can u help? the coordinates and colors for the two locations are as follows

1st click ---- pixelsearch (841, 508, 850, 513, 13816329)

2nd click----- pixelsearch (841, 508, 850, 513, 13088393)

if it doesnt find either of the colors i want it to move to (870,360) and left click then move to (845,510) and start the pixel searchs and everything again....please some1 write this script or give me some major pointers! thanks

k heres what i got...

sleep (5000)

for $r = 1 to 5

$pixel = 13816329

$a = pixelsearch (841,508,850,513,$pixel,5)

if @error Then

mousemove (870,358)

sleep (1000)

mouseclick ("left")

Else

mousemove ($a[0],$a[1])

sleep (1000)

mouseclick ("left")

sleep (800)

mouseclick ("left")

sleep (3000)

EndIf

Next

it works fine until the pixel search doesnt work...then itll click where i want it to and the pixelsearch goes again but it fails to repeat...how do i fix this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0