daxle Posted May 13, 2009 Share Posted May 13, 2009 Sleep(3000) MsgBox(0,"Starting", "We are ready to start!") $s=1 While $s=1 $reaction = PixelSearch("413,551", "621,477", "849,559", "656,656", 0x00CC33) MouseClick("left", $reaction[0], $reaction[1]) WEnd What im trying to do is loop it so that it constantly searches for the pixels, im having major trouble with this Link to comment Share on other sites More sharing options...
exodius Posted May 13, 2009 Share Posted May 13, 2009 (edited) From the Help File for PixelSearch:Return Value 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.I would presume that you need to change it to:Sleep(3000) MsgBox(0,"Starting", "We are ready to start!") $s=1 While $s=1 $reaction = PixelSearch("413,551", "621,477", "849,559", "656,656", 0x00CC33) If Not @error Then MouseClick("left", $reaction[0], $reaction[1]) EndIf Sleep (100) ; Thrown in just for good, non-cpu-hogging measure WEnd Edited May 13, 2009 by exodius Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted May 13, 2009 Share Posted May 13, 2009 well to start off the.. $s=1 While $s=1oÝ÷ ÙƧm殶sgvÆRb33³b33°¢ââà¢ââà§vVæoÝ÷ Ù©Ý~í+ºÚ"µÍ ÌÍÜXXÝ[ÛH^[ÙXÚ ][ÝÍLË MLI][ÝË ][ÝÍK ÍÉ][ÝË ][ÝÎ K MNI][ÝË ][ÝÍM M][ÝËÐÌÌÊB[ÝÙPÛXÚÊ ][ÝÛY ][ÝË ÌÍÜXXÝ[ÛÌK ÌÍÜXXÝ[ÛÌWJoÝ÷ Û*.®j,¶X¤z zÛbaÇ«®êº * If you have any questions feel free to ask! Hope this helps! - John Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted May 13, 2009 Share Posted May 13, 2009 sorry.. I was posting my reply while the guy above was I guess D;... Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
daxle Posted May 13, 2009 Author Share Posted May 13, 2009 Thanks everyone, its working great!! 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