Jump to content

Recommended Posts

Posted (edited)

I am getting this error with this little program I'm making when searching for hex colors.

Error Parsing Function Call

FUNC MuleZone()
    Opt("MouseCoordMode", 0)
    
MouseMove(105, 161)
    $coord = PixelSearch(161, 130, 163, 200, B54531,)
    If Not @error Then
        Send("{ENTER}")
        MouseClick("left", 375, 161)
        ELSE
        $coord = PixelSearch(161, 131, 167, 195, B54531,)
        If Not @error Then
            Send("{ENTER}")
            ELSE
            MouseClick("left", 103, 255)
            $coord = PixelSearch(255, 222, 263, 291, B54531,)
            If Not @error Then
                Send("{ENTER}")
                ELSE
                MouseClick("left", 368, 255)
                $coord = PixelSearch(255, 219, 260, 293, B54531,)
                If Not @error Then
                    Send("{ENTER}")
                    ELSE
                MouseClick("left", 98, 352)
                $coord = PixelSearch(352, 316, 353, 384, B54531,)
                If Not @error Then
                    Send("{ENTER}")
                    ELSE
                    MouseClick("left", 376, 346)
                    $coord = PixelSearch(346, 314, 350, 382, B54531,)
                    If Not @error Then
                        Send("{ENTER}")
                        ELSE
                        MouseClick("left", 98, 444)
                        $coord = PixelSearch(444, 405, 444, 476, B54531,)
                        If Not @error Then
                            Send("{ENTER}")
                            ELSE
                            MouseClick("left", 372, 442)
                            $coord = PixelSearch(442, 404, 446, 477, B54531,)
                            If Not @error Then
                                Send("{ENTER}")
                            Else
                                D2Quit()
                                Endif
                            EndIf
                        EndIf
                    EndIf
                EndIf
            EndIf
        EndIf
    EndIf
EndFunc
Edited by bmroyer
Posted

I am now having a problem with the ENTER key. I send text to the game, then I have to press enter to submit it. It only sends enter once. Then when it types the next text, it doesn't send enter. Do I have to add a ENTER UP function? Does is hold enter down or something and I have to send another function? I know i had to do that with the tab key.

;Anti-Idle's Your Character for Two Hours----
Func D2Idle()
    MouseMove(88, 504)
    Sleep(3000)
    MouseClick("left", 88, 504)
    Sleep(3000)
    MouseMove(580, 511)
    Sleep(60000)
    MouseClick("left", 580, 511)
    Sleep(3000)
    Send("MuleBuddy")  
    Sleep(3000)
    Send("{ENTER}")
    Sleep(3000)
    Send("Visit Royersoft.com for support")
    Sleep(3000)
    Send("{ENTER}");end
    Sleep(60000);sleep for one minute
    Send("One Minute is Up...14 to go!")
    Sleep(3000)
    Send("{ENTER}");end
    Sleep(60000);sleep for one minute
    Send("Two Minutes Up...13 to go!")
    Sleep(6000)
Posted

I am now having a problem with the ENTER key. I send text to the game, then I have to press enter to submit it. It only sends enter once. Then when it types the next text, it doesn't send enter. Do I have to add a ENTER UP function? Does is hold enter down or something and I have to send another function? I know i had to do that with the tab key.

You might want to use Opt("SendKeyDownDelay",number) to increase the amount of miliseconds that a key is held down. As the help states and as I have often experienced, the default key press duration of 5 ms is often not long enough to get a game to register the keypress. Might want to try to set it to 50 or something (though for GTA San Andreas I couldn't get it to work reliably with less than 100 ms, experiment).

Roses are FF0000, violets are 0000FF... All my base are belong to you.

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