Ham123 Posted June 10, 2009 Share Posted June 10, 2009 (edited) I accidentally thought that my issue was resolved when i changed the lines of the code and it seemed to be working but it is not I am searching every third pixel with a share variation of 5 in an approximately 100*100 pixel area. CODE $coord=pixelsearch(900,150, 1000,250, 0xFF0000, 5, 3) Mouseclick("left", $coord[0], $coord[1]) ive tried doing a Do ... Until not @error But it always gives me an error However, even If there are multiple instances of this color and shadevariation present, it always returns as an error. Why is this so? Edited June 10, 2009 by Ham123 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 10, 2009 Share Posted June 10, 2009 I accidentally thought that my issue was resolved when i changed the lines of the code and it seemed to be working but it is not I am searching every third pixel with a share variation of 5 in an approximately 100*100 pixel area. $coord=pixelsearch(900,150, 1000,250, 0xFF0000, 5, 3) Mouseclick("left", $coord[0], $coord[1]) ive tried doing a Do ... Until not @error But it always gives me an error However, even If there are multiple instances of this color and shadevariation present, it always returns as an error. Why is this so? Because it's not finding the color (red, in your example)? You shouldn't be trying to use the coordinates in another function (i.e. MousClick()) without testing for @error first, because the return may not be an array. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Ham123 Posted June 10, 2009 Author Share Posted June 10, 2009 (edited) Because it's not finding the color (red, in your example)? You shouldn't be trying to use the coordinates in another function (i.e. MousClick()) without testing for @error first, because the return may not be an array. The color is easily seen though (i tested for the color multiple times using the pixel/coord tool with autoit)yeah, ive tried testing for an @error, and it always gives me one, so..the color isnt found, even though the color is there... Edited June 10, 2009 by Ham123 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 10, 2009 Share Posted June 10, 2009 The color is easily seen though (i tested for the color multiple times using the pixel/coord tool with autoit)yeah, ive tried testing for an @error, and it always gives me one, so..the color isnt found, even though the color is there... Post the data on the Mouse tab of AU3Info.exe while looking at one of those matching pixels. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Ham123 Posted June 10, 2009 Author Share Posted June 10, 2009 (edited) Post the data on the Mouse tab of AU3Info.exe while looking at one of those matching pixels. position: 978,226cursor id: 0Color: 0xFF0000 Edited June 10, 2009 by Ham123 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 10, 2009 Share Posted June 10, 2009 position: 978,286cursor id: 0Color: 0xFF0000That's outside the 150 to 250 Y-coordinates you used. On the same topic, are you sure you matched the pixel coordinate modes you wanted? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Ham123 Posted June 10, 2009 Author Share Posted June 10, 2009 That's outside the 150 to 250 Y-coordinates you used. On the same topic, are you sure you matched the pixel coordinate modes you wanted? Sorry, that was my mistake. I edited it, Its 226 not 286 lol Link to comment Share on other sites More sharing options...
Ham123 Posted June 10, 2009 Author Share Posted June 10, 2009 (edited) Sorry, that was my mistake. I edited it, Its 226 not 286 lol up. this is in a game (no gameguard security)...so ill try this with a pixel on my desktop and see if that works...if not, then i really do not know what i am doing incorrectly.EDIT: yup works on desktop... Edited June 10, 2009 by Ham123 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