Ra8er Posted July 14, 2010 Share Posted July 14, 2010 (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 July 14, 2010 by Ra8er Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 14, 2010 Share Posted July 14, 2010 (edited) Read the sticky at the top of the forum, then drop the topic. Edited July 14, 2010 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Ra8er Posted July 14, 2010 Author Share Posted July 14, 2010 Im playing on a Privat server, so i am not bound to the EULA. Link to comment Share on other sites More sharing options...
TheLaughingMan Posted July 14, 2010 Share Posted July 14, 2010 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) Link to comment Share on other sites More sharing options...
Ra8er Posted July 15, 2010 Author Share Posted July 15, 2010 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 More sharing options...
Developers Jos Posted July 15, 2010 Developers Share Posted July 15, 2010 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 More sharing options...
Recommended Posts