Jump to content

PixelSearch Array Error


OnTheFly
 Share

Recommended Posts

Hi, this is my code:

HotKeySet("{ENTER}", "killme")
$on = 0

WinWaitActive("Hamsterpaj.net - Onlinespel, community, forum och annat kul ;)")
MouseClick("left", 500, 600, 1)
While $on = 0
$cor = PixelSearch( 187, 150, 811, 672, 0xFFFFFF )
MouseMove($cor[0], $cor[1], 0)
WEnd



Func killme()
Exit 0
EndFunc

When the mouse click is done, i get an error message that says that $cor is a non-array variable. What's wrong?

Link to comment
Share on other sites

Hi, this is my code:

HotKeySet("{ENTER}", "killme")
$on = 0

WinWaitActive("Hamsterpaj.net - Onlinespel, community, forum och annat kul ;)")
MouseClick("left", 500, 600, 1)
While $on = 0
$cor = PixelSearch( 187, 150, 811, 672, 0xFFFFFF )
MouseMove($cor[0], $cor[1], 0)
WEnd
Func killme()
Exit 0
EndFunc

When the mouse click is done, i get an error message that says that $cor is a non-array variable. What's wrong?

The pixel wasn't found, so no array is returned. Always check your return values/error codes...
Auto3Lib: A library of over 1200 functions for AutoIt
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...