Sign in to follow this  
Followers 0
XAztekar

I'm extremely new to this... Help?

3 posts in this topic

I know some stuff, but I'm trying to create a script for a web browser game.

What I want to do is double click a specific area when the color changes. Then do the same for a different area.

I also want to have it so that when a third area changes, I can click yet another area.

I know it sounds complicated, but if you guys could just say some functions that would help me out, it would be extremely appreciated.

Thanks in advance, from a complete noob. ;D

Share this post


Link to post
Share on other sites



So, this is the farthest I've gotten:

MouseClick ( "left", 274, 334, 2 )

This allows me to click the first area. Now, what I'm trying to do is click the second area after I'm done with that.

So, can I just use the function mousemove to get it to the other. Once there though, I want to make sure that it only clicks after a pixel's color changes.

My question is, how can I delay the mouse from double-clicking again, until a specific pixel changes color?

Share this post


Link to post
Share on other sites

Use PixelGetColor to see if it changes.

MouseClick("left", 274, 334, 0)
$mPos = MouseGetPos()
$Color = PixelGetColor($mPos[0], $mPos[1])

While 1
    $mPos = MouseGetPos()
    If PixelGetColor($mPos[0], $mPos[1]) <> $Color Then
        TrayTip("", "Pixel Changed.", 2); The pixel under the mouse has changed!
    Else
        TrayTip("", "Pixel is the same.", 1)
    EndIf
WEnd

Using that, you can detect if a pixel changes and you can add your click code.


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

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