Sign in to follow this  
Followers 0
Jason786

Move mouse to pixel and click?

3 posts in this topic

#1 ·  Posted (edited)

Hey, basically I am new and want to see if there is a way that I can find a pixel on the page, click 6 times and then close?

Edited by Jason786

Share this post


Link to post
Share on other sites

Helpfile > MouseMove()

Helpfile > MouseClick()

This didn't do anything, should it do something? Basically I wanted it to click the pixel when I pressed a

HotKeySet("{a}", "_Start")
HotKeySet("{s}", "_Pause")
HotKeySet("{d}", "_Exit")

Global $Active = 0

While 1
    If $Active = 1 Then
        $SquarePosition = PixelSearch(0, 0, 0, 0, 0x941616)
        If IsArray($SquarePosition) Then
            MouseMove($SquarePosition) Then
            MouseClick("left")
        EndIf
    EndIf
WEnd

Func _Start()
    $Active = 1
EndFunc   ;==>_Start

Func _Pause()
    $Active = 0

EndFunc   ;==>_Pause

Func _Exit()
    Exit
EndFunc   ;==>_Exit

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