Jump to content

Pixelsearch >.<?


Recommended Posts

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 :D

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 :D

However, even If there are multiple instances of this color and shadevariation present, it always returns as an error. Why is this so?

Edited by Ham123
Link to comment
Share on other sites

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 :D

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.

:D

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

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.

:D

The color is easily seen though :D (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 by Ham123
Link to comment
Share on other sites

The color is easily seen though :D (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.

:D

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

position: 978,286

cursor id: 0

Color: 0xFF0000

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?

:D

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

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?

:D

Sorry, that was my mistake. I edited it, Its 226 not 286 lol :D

Link to comment
Share on other sites

Sorry, that was my mistake. I edited it, Its 226 not 286 lol :D

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 by Ham123
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...