ZoOrOo Posted February 28, 2008 Share Posted February 28, 2008 sry its my third post in 1 day but i really wanna make it work and now i think i got a soluion on how to detect places (by searching for more than 1 pixel like a color and then take the coord + 10 to search up it by some pixels and if it was right then search for another pixel untill we are sure its the thing we want ) now the error i get when i pixel search and i take the coords like this $check=pixelsearch(0,0,@DesktopWidth,@DesktopHeight,"0x3D5644") while @error=1 MouseClickDrag("right",359,314,0,311,3) sleep(1000) WEnd $ncheck=pixelsearch(0,0,@DesktopWidth,@DesktopHeight,"0x79540D") msgbox(1,"found","found") mousemove($check[0] &,$check[1]) it give me error when makeing the last step saying "subscript used with non-array variable." any help please Link to comment Share on other sites More sharing options...
weaponx Posted February 28, 2008 Share Posted February 28, 2008 Don't put parentheses around the hex color codes. Link to comment Share on other sites More sharing options...
ofLight Posted February 28, 2008 Share Posted February 28, 2008 (edited) I think maybe you just need to move your Pixelsearch into your loop, otherwise it will onbly search once. Im not sure I understand what u want the script to do exactly, but this is my go at it Do $check=pixelsearch(0,0,@DesktopWidth,@DesktopHeight, 0x3D5644) MouseClickDrag("right",359,314,0,311,3) sleep(1000) Until IsArray($check) mousemove($check[0],$check[1]) ; I am uncertain what the rest of this is supposed to be doing ??? $ncheck=pixelsearch(0,0,@DesktopWidth,@DesktopHeight, 0x79540D) msgbox(1,"found","found") mousemove($check[0],$check[1]) ;<----Is this supposed to be $check or $ncheck ??? Edited February 28, 2008 by ofLight 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...
ZoOrOo Posted February 28, 2008 Author Share Posted February 28, 2008 it suppose to check for pixel and then if it found it check for another pixel if it is found it click on it and i will try ur helps thanks alot Link to comment Share on other sites More sharing options...
ofLight Posted February 28, 2008 Share Posted February 28, 2008 oic, this is prolly closer. While 1 Do $check=pixelsearch(0,0,@DesktopWidth,@DesktopHeight, 0x3D5644) MouseClickDrag("right",359,314,0,311,3) sleep(1000) Until IsArray($check) $ncheck=pixelsearch(0,0,@DesktopWidth,@DesktopHeight, 0x79540D) If IsArray($ncheck) Then MouseClick("Left",$check[0],$check[1]) Wend 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...
ZoOrOo Posted February 29, 2008 Author Share Posted February 29, 2008 thank you very much 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