Jump to content

Subscript used with non-Array variable


doccy
 Share

Recommended Posts

Hello guys, sorry if i bother you but i'm a total newbie in autoit scripting and i can't get rid off this error

My script try to find a color and if it find it to press the right mouse button on it.

Here it goes

HotKeySet("{HOME}","Clicker")

While 1

Sleep(1000)

WEnd

Func Clicker()

While 1

Opt("MouseClickDownDelay", 50)

Send("{SPACE}")

sleep(300)

$pos = PixelSearch (752,345,1001,589,0x3E0C3F)

sleep(2000)

If @error <> 1 then

MouseClick( "right" ,$pos[0], $pos[1])

EndIf

WEnd

EndFunc

I've tried everything if @error = 2 if not @error if @error = 0, but nothing helped ;)

Please help me :)

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
 Share

  • Recently Browsing   0 members

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