Sign in to follow this  
Followers 0
sig

Noob Question on How to Write Macros (COLOR)

3 posts in this topic

Greetings,

I am new to writting macros I have a question, I already finish writting a simple macros, but I am hoping it can have the activate and deactivate reading a color location from a X,Y Location if it changes the RGB color.

can anyone help me how to add that script in? Please.

Iam thinking something with like below I just don't know what the script codes are.

Read X,Y location, if X,Y location = RGB color 00ff00

then macros Pause

Read X,Y location, if X. Y location not = RGB color 00ff00

Macros Continues (unPause)

Please help me.

Sincerely,

Sig

Share this post


Link to post
Share on other sites



Should be able to use getpixel or pixelsearch.

Share this post


Link to post
Share on other sites

$X = 100
$Y = 100
$_Color = 0xFFFFFF

While 1
    $color = PixelGetColor($x, $y)
    If Hex($color) = $_color Then
        While Hex($color) = $_color
            $color = PixelGetColor($x, $y)
            ToolTip("Macros are paused",0,0)
            Sleep(100)
        Wend
    Else
        ;Macros Here
    EndIf
WEnd

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  
Followers 0