Jump to content

Pixelsearch help


Recommended Posts

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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...