Jump to content

Controlclick Problem


Recommended Posts

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
Link to comment
Share on other sites

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 :-/

Link to comment
Share on other sites

  • Developers

Im playing on a Privat server, so i am not bound to the EULA.

We don't care as we cannot check.

*click*

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...