Jump to content

Recommended Posts

Posted

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!

Posted

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
Posted (edited)

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.

Posted

Getting this notice:

Until

Until^ Error

Error: Error in expression

This happens ever time after I click the pixel. Is this because the pixel does not disappear right away.

Posted

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
Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...