Jump to content
Sign in to follow this  
pwnt

Pixelsearch help

Recommended Posts

pwnt

Hi, I just started scripting a few days ago and I am having some difficulty using Pixelsearch. All I want the script to do is find a shortcut on my desktop (yellow btw) and double click it,

This is what my script looks like:

sleep(2000);Just to have time to minimize my windows.

$psearch = PixelSearch(291, 277, 3, 161, 0xF7C852 ,20,5)
If not @error Then
$x = $psearch[0]
$y = $psearch[1]
mouseclick( "left", $psearch[0], $psearch[1], 2,50)
EndIf

Thanks in advance :)

Share this post


Link to post
Share on other sites
ofLight

Maybe just your search area wasnt looking where there was yellow? this will search your entire Desktop

Worked for me.

sleep(2000);Just to have time to minimize my windows.

$psearch = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0xF7C852 ,20,5)
If not @error Then
    $x = $psearch[0]
    $y = $psearch[1]
    mouseclick( "left", $psearch[0], $psearch[1], 2,50)
EndIf

There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly

Share this post


Link to post
Share on other sites
cageman

thanks so much :) I must just suck at coords

next time if you need coords for a pixelsearch. Find the coords with the window info tool.

Then say you found a coordinate x and y

$psearch = PixelSearch(x-20, y-20, x+20, y+20, 0xF7C852 ,20,5)

then you got a nice retangle where you need to search.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.