lasse46 Posted May 4, 2006 Share Posted May 4, 2006 hmmm this code seems right to me?Dim $coord$Delay = 100$MouseSpeed = 0 $coord = PixelSearch( 0, 100, 800, 475, 0x6aad54, 20, 5 ) MouseClick("left",$coord[0],$coord[1], 1, $MouseSpeed) Sleep($Delay)EXITbut i get : http://files.upl.silentwhisper.net/upload4/pixelllll.JPGplease would love help? Link to comment Share on other sites More sharing options...
Don N Posted May 4, 2006 Share Posted May 4, 2006 (edited) Help file infor for PixelSearch Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y) Failure: Sets @error to 1 if color is not found. You need to check @error first, what if the pixel isnt found, then coord will not be an array $Delay = 100 $MouseSpeed = 0 $coord = PixelSearch( 0, 100, 800, 475, 0x6aad54, 20, 5 ) If @error = 1 Then MsgBox( 0, "ERROR!!!", "The pixel 0x6aad54 was not found" ) Else MouseClick("left",$coord[0],$coord[1], 1, $MouseSpeed) EndIf Sleep($Delay) EXIT that should prevent u from getting that error, will only try to use coord if the pixel was found EDIT: typo in post Edited May 4, 2006 by Don N _____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper Link to comment Share on other sites More sharing options...
Valuater Posted May 4, 2006 Share Posted May 4, 2006 (edited) 1 Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y) Failure: Sets @error to 1 if color is not found. 2 Dim $coord $Delay = 100 $MouseSpeed = 0 $coord = PixelSearch( 0, 100, 800, 475, 0x6aad54, 20, 5 ) if Not @error Then MouseClick("left",$coord[0],$coord[1], 1, $MouseSpeed) Sleep($Delay) oooo... same response... but way slow..lol 8) Edited May 4, 2006 by Valuater Link to comment Share on other sites More sharing options...
Valuater Posted May 4, 2006 Share Posted May 4, 2006 (edited) Help file infor for PixelSearch Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y) Failure: Sets @error to 1 if color is not found. You need to check @error first, what if the pixel isnt found, then coord will not be an array $Delay = 100 $MouseSpeed = 0 $coord = PixelSearch( 0, 100, 800, 475, 0x6aad54, 20, 5 ) If @error = -1 Then MsgBox( 0, "ERROR!!!", "The pixel 0x6aad54 was not found" ) Else MouseClick("left",$coord[0],$coord[1], 1, $MouseSpeed) EndIf Sleep($Delay) EXIT that should prevent u from getting that error, will only try to use coord if the pixel was found EDIT: typo in post ??? 8) Edited May 4, 2006 by Valuater Link to comment Share on other sites More sharing options...
Don N Posted May 4, 2006 Share Posted May 4, 2006 ???8) :"> oooops _____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper 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