eqpaisley Posted October 5, 2013 Share Posted October 5, 2013 Hi there and thanks for your time. I'm running a scrip and, part of it, involves PixelSearch() - then clicking on the location the pixel was found. Here's what I've got: $coord = PixelSearch(368, 161, 1301, 679, 0x0DA2D8, 10) $x = $coord[0] $y = $coord[1] MouseClick("left", $x, $y) I've delcare them as Local variables AND as DIM in different verison of the script but the same thing happens. The script runs fine and the function works, 3, 4, 5 times (its in a WHILE loop) then later in the looping it crashes with the error that $coord isn't an array. Any thoughts why it works and then suddenly doesn't? thanks! Link to comment Share on other sites More sharing options...
Developers Jos Posted October 5, 2013 Developers Share Posted October 5, 2013 PixelSearch() doesn't return an Array in case the color isn't found. Test the @error value first. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
eqpaisley Posted October 5, 2013 Author Share Posted October 5, 2013 Ahhhhh that must be it, must be the occassions where it doesn't find the color for some reason! I'll check the error value, thanks much. Link to comment Share on other sites More sharing options...
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