Jump to content

Recommended Posts

Posted

Hello Guys,

I have used auto it years and years ago. I was attempting to make a little script up. It has been a while for me an I had a couple questions. Here is what I am using for a script (based on some examples)

#include <MsgBoxConstants.au3>
While 1
Sleep(2000)
; Find a pure red pixel or a red pixel within 10 shades variations of pure red
$aCoord = PixelSearch(214, 6, 300, 150, 0xDADADA)
If Not @error Then
   MouseMove( $aCoord[0], $aCoord[1])
    MsgBox($MB_SYSTEMMODAL, "", "X and Y are: " & $aCoord[0] & "," & $aCoord[1])
 else
    MsgBox($MB_SYSTEMMODAL, "Error", "Error")
 EndIf

Currently I am just doing Testing. I am looking to have my mouse follow around a moving pixel. I am not sure if there is a better way to do this other then the pixelsearch function. Where my issue is coming in, is actually finding the colour I am looking for. I was just trying to draw some stuff in paint or open random applicaitons. I used the autoit v3 window info on the mouse tab. I could try to point at the colour I wanted but I didnt seem to get a good result. It seems almost like the colour its grabbing is not right on the tip of my mouse. How do you guys approach pulling colours? I was thinking of making a screenshot of what I am attempting to capture the colour on and work with that? 

 

Just

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