Jump to content
Sign in to follow this  
Ham123

Pixelsearch >.<?

Recommended Posts

Ham123

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
Ham123

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
Ham123

Post the data on the Mouse tab of AU3Info.exe while looking at one of those matching pixels.

:D

position: 978,226

cursor id: 0

Color: 0xFF0000

Edited by Ham123

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
Ham123

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

Share this post


Link to post
Share on other sites
Ham123

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

Share this post


Link to post
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
Sign in to follow this  

×