Sign in to follow this  
Followers 0
13lack13lade

pixelsearch

3 posts in this topic

hi guys,

trying to automate clicking on a colour, but i cant figure out how to do put the coordinates in correctly,

1053,184 = left
1650,185 = right
1315,149 = top
1315,221 = bottom
 
colour = 15791353
 
Current script is clicking on an orange item instead of blue and always clicks on the top left of the screen..
sleep(2000)
$coord = PixelSearch(184, 149, 1315, 221, 15791353)
MouseClick("left", $coord, 1, 1)

 

Share this post


Link to post
Share on other sites



Check the parameters

https://www.autoitscript.com/autoit3/docs/functions/PixelSearch.htm

you can try use the Autoit Window Info in Autoit folder - Au3Info.exe to get the position's colors

sleep(2000)
$coord = PixelSearch(184, 149, 1315, 221, 0xFFFFFF)
If Not @error Then
    MouseClick("left", $coord[0],$coord[1], 1, 1)
EndIf

PixelSearch() return arrays, $coord[0] = x;$coord[1] = y


[color=rgb(255,0,0);]C[/color][color=rgb(255,140,0);]a[/color][color=rgb(255,215,0);]n[/color] [color=rgb(255,255,0);]i[/color] [color=rgb(175,238,238);]e[/color][color=rgb(0,255,255);]a[/color][color=rgb(64,224,208);]t[/color] [color=rgb(0,0,205);]S[/color][color=rgb(0,0,255);]i[/color][color=rgb(0,0,128);]g[/color][color=rgb(75,0,130);]n[/color][color=rgb(128,0,128);]at[/color][color=rgb(238,130,238);]u[/color][color=rgb(221,160,221);]r[/color][color=rgb(230,230,250);]e[/color] [color=rgb(0,255,0);]?[/color] :ermm: [color=rgb(0,255,0);]Project: Mini Youtube BETA[/color]

Share this post


Link to post
Share on other sites

thank you! :) greatly appreciated!

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