Guest Xelos Posted January 11, 2005 Posted January 11, 2005 my trouble is it seems pixelsearch doesn't accept any other valye that numbers, i explain: there is 2 events 1 depends on the other (localisation wise) i do a pixelsearch on first event, successfully then i would like to find a 2 nd pixel (event) AROUND the first i found like $COORD2 = PIXELSEARCH ($varX1, $vary3, $varX2, $vary4, 0XF6F6F6, 30, 4) where variable would be my first localisation found with pixelsearch+ or - a value (to form the new search box, like $coord1 - 10 for $varX1 ...) thx for your help
phillip123adams Posted January 11, 2005 Posted January 11, 2005 my trouble is it seems pixelsearch doesn't accept any other valye that numbers, i explain:there is 2 events 1 depends on the other (localisation wise)i do a pixelsearch on first event, successfullythen i would like to find a 2 nd pixel (event) AROUND the first i foundlike $COORD2 = PIXELSEARCH ($varX1, $vary3, $varX2, $vary4, 0XF6F6F6, 30, 4)where variable would be my first localisation found with pixelsearch+ or - a value (to form the new search box, like $coord1 - 10 for $varX1 ...)thx for your help <{POST_SNAPBACK}>PixelSearch returns an array, with index 0 being the x coordinate, and index 1 being the y coordinate. To add or subtract a value from them do someting similar to the following:$iX1 = $Coord2[0] - 10$iY1 = $Coord2[1] - 10$iX2 = $Coord2[0] + 100$iY2 = $Coord2[1] + 100$aiCoord3 = PIXELSEARCH ($iX1, $iY1, $iX2, $iY2, 0XF6F6F6, 30, 4) Phillip
Guest Xelos Posted January 15, 2005 Posted January 15, 2005 tried that, with the spelling and spacing and it retrives the following error: error: subscript used with non-Array variable (same error as before)
Developers Jos Posted January 15, 2005 Developers Posted January 15, 2005 tried that, with the spelling and spacing and it retrives the following error:error: subscript used with non-Array variable(same error as before)<{POST_SNAPBACK}>test @error to see if pixelsearch() was succesful or not. if it didn't find anythinbg it will not return an Array and you get this error. 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.
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