pwnt Posted June 19, 2008 Share Posted June 19, 2008 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 More sharing options...
ofLight Posted June 19, 2008 Share Posted June 19, 2008 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 More sharing options...
pwnt Posted June 20, 2008 Author Share Posted June 20, 2008 thanks so much I must just suck at coords Link to comment Share on other sites More sharing options...
cageman Posted June 20, 2008 Share Posted June 20, 2008 thanks so much I must just suck at coordsnext 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 More sharing options...
newbiescripter Posted June 20, 2008 Share Posted June 20, 2008 Insted of doing a pixelsearch of the whole screen then just see if the file exist and if then execute it. like this: $file = @DesktopDir & "\Google.url" If FileExists($file) Then ShellExecute($file) Regards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now