Jump to content

Recommended Posts

Posted (edited)

Farm()

Func Farm()
    If WinExists("World of Warcraft") Then
    $hWnd = WinGetHandle("World of Warcraft")
ElseIf
    Exit
    EndIf
    Sleep(200)
    
$Maden = 1
    
    While $Maden <= 100
        ControlSend($hWnd, "", "", "{G}");
    $Maden = $Maden + 1
        ControlSend($hWnd, "", "", "{TAB}")
        Sleep(6000)
        ControlClick( "World of Warcraft", "", 0 [, "right" [, 1 [, 1940 [, 470 ]]]] )
        Sleep(7000)
        ControlClick( "World of Warcraft", "", 0 [, "right" [, 1 [, 1940 [, 470 ]]]] )
        ControlClick(
        Sleep(1000)
        
Wend

EndFunc

I Want the Script to double rightclick with a delay of 7 seconds, but i get an error when the script reaches the controlclick line. I cant find the Mistake, can anyone please help me?

The error is a Parssing error, may this helps

Greetings

Ra8er

Edited by Ra8er
Posted

Remove all the brackets.

Remove ElseIf and Exit

Remove unfinished ControlClick

Place the EndIf before EndFunc

Make sure you have a correct controlID

Add quotation marks on the controlID

ControlClick("Untitled - Notepad", "", "Edit1", "left", 1, 0, 0)
Posted

Remove all the brackets.

Remove ElseIf and Exit

Remove unfinished ControlClick

Place the EndIf before EndFunc

Make sure you have a correct controlID

Add quotation marks on the controlID

ControlClick("Untitled - Notepad", "", "Edit1", "left", 1, 0, 0)

Farm()

Func Farm()
    If WinExists("World of Warcraft") Then
    $hWnd = WinGetHandle("World of Warcraft")

    Sleep(200)
    
$Maden = 1
    
    While $Maden <= 100
        ControlSend($hWnd, "", "", "{G}")
    $Maden = $Maden + 1
    Sleep(6000)
        ControlSend($hWnd, "", "", "{TAB}")
        Sleep(500)
        ControlClick( "World of Warcraft", "", 0 , "right", 1, 1940, 400 )
        Sleep(7000)
        ControlClick( "World of Warcraft", "", 0 , "right", 1, 1940, 400 )
        Sleep(1000)
        
    Wend
        EndIf
EndFunc

I fixed it like this

The script is not crashing anymore but it still dosn't do his job. WoW got no ControlID, the click dont get into the porgramm :-/

Guest
This topic is now closed to further replies.
×
×
  • Create New...