Jump to content
Sign in to follow this  
aznkaoz

well i searched around the fourm

Recommended Posts

well i get how to find the right pixel now but how would i make the mouse move then click?

Edited by aznkaoz

Share this post


Link to post
Share on other sites

May sound hard but

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

that command perform a mouse click in the x,y position. And Speed is how fast the mouse move to the point.

Share this post


Link to post
Share on other sites

well i get how to find the right pixel now but how would i make the mouse move then click?

<{POST_SNAPBACK}>

Hello :idiot: you can edit this for you its a great exampel for Newbie`s on Pixelsearch! I hope this it is wat do you need!

HotKeySet("{f5}", "Sing")
Global $Singing

While 1
    If $Singing then
        Sleep(2000)
        MouseClick( "left", 955, 657, 2, 1 )
        $A = PixelSearch( 248, 219, 255, 608, 14602076, 2 )
        If Not @error Then
            $R = PixelSearch( 284, $A[1], 295, 632, 16777215, 2 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $C = PixelSearch( 359, 194, 362, 632, 16777215, 1 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $O = PixelSearch( 376, $C[1], 380, 632, 16777215, 1 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $R = PixelSearch( 394, $O[1], 396, 632, 16777215, 1 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $V = PixelSearch( 406, $R[1], 410, 632, 16777215, 1 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $I = PixelSearch( 426, $V[1], 430, 632, 16777215, 1 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $N = PixelSearch( 439, $I[1], 443, 632, 16777215, 1 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $1 = PixelSearch( 455, 200, 500, 206, 16777215, 1 )
        Else
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
        If Not @error Then
            $2 = PixelSearch( 455, 274, 500, 280, 16777215, 1 )
        Else
            MouseMove( 300, 230 )
            PixelSearch( 358, 235, 383, 230, 16777215, 1 )
            If @error Then
                Call("Play")
                ContinueLoop
            EndIf
        EndIf
        If Not @error Then
            $3 = PixelSearch( 455, 351, 500, 357, 16777215, 1 )
        Else
            MouseMove( 300, 300 )
            PixelSearch( 358, 308, 383, 313, 16777215, 1 )
            If @error Then
                Call("Play")
                ContinueLoop
            EndIf    
        EndIf
        If Not @error Then
            $4 = PixelSearch( 455, 428, 500, 433, 16777215, 1 )
        Else
            MouseMove( 300, 380 )
            PixelSearch( 358, 384, 383, 391, 16777215, 1 )
            If @error Then
                Call("Play")
                ContinueLoop
            EndIf    
        EndIf
        If Not @error Then
            $5 = PixelSearch( 455, 502, 500, 507, 16777215, 1 )
        Else
            MouseMove( 300, 450 )
            PixelSearch( 358, 459, 383, 464, 16777215, 1 )
            If @error Then
                Call("Play")
                ContinueLoop
            EndIf
        EndIf
        If Not @error Then
            $6 = PixelSearch( 455, 580, 500, 586, 16777215, 1 )
        Else
            MouseMove( 300, 530 )
            PixelSearch( 358, 535, 383, 540, 16777215, 1 )
            If @error Then
                Call("Play")
                ContinueLoop
            EndIf    
        EndIf
        If Not @error Then
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        Else
            MouseMove( 300, 605 )
            PixelSearch( 358, 610, 383, 615, 16777215, 1 )
            If @error Then
                Call("Play")
                ContinueLoop
            EndIf    
        EndIf
        If Not @error Then
            Sleep(1000)
            MouseMove( 615, 687, 1 )
            Sleep(1000)
            MouseClick( "left", 615, 687, 1, 1 )
            ContinueLoop
        EndIf
    EndIf

WEnd

Func Sing()
    $Singing = NOT $Singing
EndFunc

Func Play()
    Sleep(1000)
    MouseClick( "left" )
    Sleep(3000)
    Send("ggggg")
    Sleep(500)
    MouseClick( "left" )
    Sleep(5000)
    MouseClick( "left", 206, 446, 2, 1 )
    Sleep(1000)
    MouseClick( "left", 295, 546, 1, 1 )
    Sleep(300000)
    MouseClick( "left", 708, 630, 2, 1 )
    Sleep(2000)
    MouseClick( "left", 383, 275, 2, 1 )
    Sleep(2000)
    MouseClick( "left", 508, 649, 2, 1 )
    Sleep(2000)
    MouseClick( "left", 931, 635, 2, 1 )
    Sleep(2000)
    MouseClick( "left", 586, 330, 2, 1 )
    Sleep(2000)
    MouseClick( "left", 730, 651, 2, 1 )
    Sleep(13000)
EndFunc
Edited by DirtyBanditos

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...