OnTheFly Posted February 12, 2007 Posted February 12, 2007 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?
PaulIA Posted February 12, 2007 Posted February 12, 2007 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
OnTheFly Posted February 12, 2007 Author Posted February 12, 2007 The pixel wasn't found, so no array is returned. Always check your return values/error codes...Why can't the script find the pixel?
MHz Posted February 12, 2007 Posted February 12, 2007 Why can't the script find the pixel?Because the helpfile says...Failure: Sets @error to 1 if color is not found. and you need to check for that condition in your code to avoid issue.
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