RandomGuest Posted August 20, 2007 Share Posted August 20, 2007 (edited) Hello, so what is the script for searching the whole screen after a color (lets say FFE07E ) and if it finds the color it will move the mouse to the position of the color and left mouse-click it, if it doesnt find the color it does nothing. Yeah thanks... . Edited August 20, 2007 by RandomGuest Link to comment Share on other sites More sharing options...
weaponx Posted August 20, 2007 Share Posted August 20, 2007 $Pixel = PixelSearch ( 0, 0, @DesktopWidth, @DesktopWidth, 0xFFE07E) If NOT @ERROR Then MouseClick ( "left" , $Pixel[0], $Pixel[1]) EndIf Link to comment Share on other sites More sharing options...
RandomGuest Posted August 20, 2007 Author Share Posted August 20, 2007 (edited) $Pixel = PixelSearch ( 0, 0, @DesktopWidth, @DesktopWidth, 0xFFE07E) If NOT @ERROR Then MouseClick ( "left" , $Pixel[0], $Pixel[1]) EndIf Thanks, that really helped but I also forgot to ask how to make it do something if it >doesnt< find the pixel . Edited August 20, 2007 by RandomGuest Link to comment Share on other sites More sharing options...
secre555 Posted August 20, 2007 Share Posted August 20, 2007 Thanks, that really helped but I also forgot to ask how to make it do something if it >doesnt< find the pixel .Add an ElseIf statement after the statement that tells it what to do if it does find the correct pixel. Link to comment Share on other sites More sharing options...
Gif Posted August 20, 2007 Share Posted August 20, 2007 $Pixel = PixelSearch ( 0, 0, @DesktopWidth, @DesktopWidth, 0xFFE07E) If @ERROR Then ;Do something Else MouseClick ( "left" , $Pixel[0], $Pixel[1]) EndIf 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