yeads Posted July 1, 2015 Share Posted July 1, 2015 expandcollapse popupLocal $i = 0; Do $point = PixelSearch(13, 63,1353, 713, 0x3D0900) if IsArray($point) Then MouseClick("left", $point[0], $point[1], 1, 2) Sleep(4000) EndIf $point = PixelSearch(78, 574,159, 605, 0x1C928E) if IsArray($point) Then MouseClick("left",259, 623) Sleep(1000) Send("{SPACE}") Sleep(2000) $point = PixelSearch(13, 63,1353, 713,0x3D0900) if IsArray($point) Then MouseClick("left", $point[0], $point[1], 1, 2) EndIf $point = PixelSearch(1290, 476,1323, 500, 0x694F09) if IsArray($point) Then $point = PixelSearch(13, 63,1353, 713, 0x766044) EndIf if IsArray($point) Then MouseClick("left", $point[0], $point[1], 1, 2) Sleep(4000) EndIf $point = PixelSearch(304, 142,804, 464,0x1D207B) if IsArray($point) Then MouseClick("right",548, 397) Sleep(1000) MouseClick("left",491, 453) Sleep(50000) EndIf $i = $i + 1; Until $i = 6; $point = PixelSearch(13, 63,1353, 713, 0x1B292B) if IsArray($point) Then MouseClick("left", $point[0], $point[1], 1, 2) Sleep(1000) Send("{SPACE}") EndIf Link to comment Share on other sites More sharing options...
Developers Jos Posted July 1, 2015 Developers Share Posted July 1, 2015 Think you are missing an EndIf after your second if.use au3check to validate your source and find issues like this. Just install the full scite4autoit3 package to accomplish this.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...
nitekram Posted July 1, 2015 Share Posted July 1, 2015 This works, so maybe somewhere else in your code? Local $iCount = 0 Do ConsoleWrite($iCount & @CRLF) $iCount += 1 Until $iCount = 6 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
water Posted July 1, 2015 Share Posted July 1, 2015 Can you please tell us which program you try to automate?Most of the time PixelSearch and clicking on mouse coordinates isn't very reliable because it depends on screen resolution and window positions. 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