ken107 Posted February 8, 2016 Share Posted February 8, 2016 (edited) hey guys this is my script i dont know why it dont work hope someone can help me expandcollapse popup#include <AutoItConstants.au3> HotKeySet("{F6}", "Start") HotKeySet("{ESC}", "Stop") While 1 Sleep(100) WEnd Func Start() While 1 $SearchResult = PixelSearch(836, 921, 836, 921, 0x2F372A, 10) ;;Find Health pixel (Schwarz) If Not @error Then MouseMove(845, 901, 0) ;; Bewegt maus auf die einheit die low ist MouseClick($MOUSE_CLICK_LEFT) ;; Double Click on the target MouseClick($MOUSE_CLICK_LEFT) $Pixel = PixelSearch(31, 800, 349, 1018, 0xA8B0A3, 10) ;; Find Base Pixel (Weiß) If Then MouseMove($Pixel[0], $Pixel[1], 3) ;; Move Mouse to Weiß Pixel MouseClick($MOUSE_CLICK_RIGHT) ;;Double right click MouseClick($MOUSE_CLICK_RIGHT) Sleep(200) Do Until IsArray($SearchResult) = True Sleep(500) EndIf Sleep(100) WEnd WEnd EndFunc ;==>Start Func Stop() Exit EndFunc ;==>Stop ERROR: (40) : ==> "Wend" statement with no matching "While" statement.: WEnd cant find my mistake maybe im too dumb ^^ ty for your help Edited February 8, 2016 by Jos Link to comment Share on other sites More sharing options...
Exit Posted February 8, 2016 Share Posted February 8, 2016 Welcome to the Forum. Use Tidy to see the error. e.g.; the line " If Then " is incorrect. Also there is no second while. therefore the error message. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Developers Jos Posted February 8, 2016 Developers Share Posted February 8, 2016 Have a look at your Tidied source which shows your issue closing an If with a Wend. There are other errors in you code which you can easily find by installing the Full SciTE4AutoIt3 package which runs au3check for you. Jos PS: Also please read our forum rules as this script seems to be for some sort of game? 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...
ken107 Posted February 8, 2016 Author Share Posted February 8, 2016 ty for the fast answer but now i got other error dunno is my while wrong? #include <AutoItConstants.au3> HotKeySet("{F6}","Start") HotKeySet("{ESC}","Stop") While 1 Sleep(100) WEnd Func Start () While 1 $SearchResult = PixelSearch ( 836, 921, 836, 921, 0x2F372A,10) ;;Find Health pixel (Schwarz) If Not @error Then MouseMove(845, 901,0) ;; Bewegt maus auf die einheit die low ist MouseClick($MOUSE_CLICK_LEFT) ;; Double Click on the target MouseClick($MOUSE_CLICK_LEFT) While 2 $Pixel = PixelSearch ( 31, 800, 349, 1018, 0xA8B0A3,10 ) ;; Find Base Pixel (Weiß) MouseMove($Pixel[0], $Pixel[1], 3) ;; Move Mouse to Weiß Pixel MouseClick($MOUSE_CLICK_RIGHT) ;;Double right click MouseClick($MOUSE_CLICK_RIGHT) Sleep(200) Do Until IsArray ($SearchResult) = True Sleep(500) Sleep(100) WEnd WEnd (row 40) EndFunc Func Stop () Exit EndFunc (40) : ==> "Wend" statement with no matching "While" statement.: WEnd Link to comment Share on other sites More sharing options...
InunoTaishou Posted February 8, 2016 Share Posted February 8, 2016 In SciTE press Ctrl+T and you'll see where the problem lies. Also, read the forum rules. This looks like gameplay automation and those kinds of scripts are not allowed. (Find Health pixel, click target) Link to comment Share on other sites More sharing options...
Developers Jos Posted February 8, 2016 Developers Share Posted February 8, 2016 38 minutes ago, InunoTaishou said: In SciTE press Ctrl+T and you'll see where the problem lies. Only after loading the full SciTE4AutoIt3 version. @ken107, please use the code (<>) box option to post scripts for readability. Did you do as I suggested? Jos 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...
JohnOne Posted February 8, 2016 Share Posted February 8, 2016 You are missing endif AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted February 8, 2016 Share Posted February 8, 2016 You are missing endif AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted February 8, 2016 Share Posted February 8, 2016 triple post? great My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now