Jump to content

How do i make a follow pixel script


 Share

Recommended Posts

I need it to click

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x86827C Dec: 8815228

So when taht pops up it will clicl on it then pause for 2 sec and do loop.

Its all in the help file. Also you can search the forum. There are so many freakin scripts that have been asked for like this its not even funny. No one here generally wants to write a script for you. We want you to learn to script for yourself.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • Moderators

Global $WINDOW = "Put Your Window You Want To Search Title Here"
Dim $x_one = 1; replace with x starting point
Dim $x_two = 1; replace with x ending point
Dim $y_one = 1; replace with y starting point
Dim $y_two = 1; replace with y ending point

While 1; Can replace "1" with WinExists($WINDOW)
    $Your_Colour = 0x86827C; Put your hex color here that you want to find
    
    If Not WinActive($WINDOW) Then WinActivate($WINDOW)
        
    Sleep(500)
    
    $PIX_SEARCH = PixelSearch($x_one, $y_one, $x_two, $y_two, $Your_Colour)
    
    If Not @error Then
        Sleep(2000)
        MouseClick("Left", $PIX_SEARCH[0], $PIX_SEARCH[1], 1, 1); Will click when and where it finds the colour you asked
    EndIf

WEnd

Edit: Added Sleep(2000) for aproximate 2 second pause before clicking where it found the colour.

Edited by ronsrules

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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