Maibuwolf Posted February 21, 2006 Posted February 21, 2006 so i got this code typed out and it is as follows Func bleh() $F = PixelSearch( 141, 90, 470, 350, 15058587, 0, 10 ) sleep(500) if not @error then MouseMove($F[0], $F[1], 0) Sleep(100) MouseClick("left") else endif EndFunc ok as you can see im running a pixel search for the said pixel looking for an exact match and stepping by 10. Now if it fails it should set @error to 1. So assuming the pixel is found it should do the code in my if statement correct? Please note that performing the code inside the if state if said pixel is found is what im going for here. Also note i have this looped to run continuously. Every time i run it it errors instantly with autoit saying: error on line blah blah MouseMove($F[0], $F[1], 0) MoveMouse($F^ Error Error: Subscript used with non-array Variable only way it should perform that code is if the error was not set to 1 meaning that it found the pixel. If it infact found the pixel then the variable $f should infact be an array. From this it appears as though it is performing the code withing my if statement regardless of what @error is equal to. Any ideas?
Nuffilein805 Posted February 21, 2006 Posted February 21, 2006 the sleep won't get an error remove the sleepline and it should work my little chatmy little encryption toolmy little hidermy unsafe clickbot
Maibuwolf Posted February 21, 2006 Author Posted February 21, 2006 thanx cant belive i didnt notice that..well it is 4:30 am and i have to go to bed late coding rawks
Nuffilein805 Posted February 21, 2006 Posted February 21, 2006 glad i could help you with my simple answer gn8 my little chatmy little encryption toolmy little hidermy unsafe clickbot
jaenster Posted February 21, 2006 Posted February 21, 2006 $F = PixelSearch( 141, 90, 470, 350, 15058587, 0, 10 ) Why decimal colors ? -jaenster
greenmachine Posted February 22, 2006 Posted February 22, 2006 Because he can. In the helpfile for PixelSearch: Color: Color value of pixel to find (in decimal or hex).
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