Jump to content

After it finds a pixel colour and clicks it I need to now...


Draegon
 Share

Recommended Posts

Is it possible to click ______ pixel colour then when it changes to ______ pixel colour it does the next line?

As in if I tell it to find 0xFF0000 and then click it, now once it changes colour to, lets say 0x8E8660 after a few seconds I need it to do the next line of script, but wait until the pixel 0xFF0000 it found turns into 0x8E8660.

Hope you understand and please help!

Link to comment
Share on other sites

Okay thanks, although how would I get it to wait for X,Y pixel to turn into 0xXXXXXX?

It won't "wait", you'll have to check it in a loop doing PixelGetColor() until it changes to what you're looking for.

:)

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

Do
$pixel = PixelSearch (0,0,@DesktopWidth,@DesktopHeight,0xXXXXXX)
Sleep(200)
Until
$pixel = @error

That will continue your next bit of script if the colour disappers, or indeed if it not there to begin with. (i think)

If you know where the pixel is, you might be better using PixelGetColor

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Do
$pixel = PixelSearch (0,0,@DesktopWidth,@DesktopHeight,0xXXXXXX)
Sleep(200)
Until $pixel = @error

I may have gotten it wrong try it like this

PixelSearch() returns an array. How are you comparing that to @error?

:)

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

it switches to diffrent pixels without waiting for the first one it goes to, to change. Help please?

If by "Help please" you mean "Please write it for me", then NO. :)

But this is a pretty simple exercise for you to learn from. So try again and post the code you are using so far when you ask for help. It shows your work and makes it easier to see where you mistake is. PixelSearch() returns an array with the coordinates of the pixel. After you have that, just loop on PixelGetColor() at those coordinates, until the color changes to something else. That seemed to be what you were looking for before.

Get that much working correctly before you try to continue adding things to your script.

:)

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

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