Jump to content

pixelsearch problems


Recommended Posts

so i got this code typed out and it is as follows

Func bleh()

$F = PixelSearch( 141, 90, 470, 350, 15058587, 0, 10 )
if not @error then
   MouseMove($F[0], $F[1], 0)





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?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...