Jump to content
yeads

DO UNTIL doesnt work.

Recommended Posts

yeads
Local $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

 

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
nitekram

This works, so maybe somewhere else in your code?

 

Local $iCount = 0

Do
    ConsoleWrite($iCount & @CRLF)
    $iCount += 1

Until   $iCount = 6

 


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."

 

WindowsError.gif

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

Share this post


Link to post
Share on other sites
water

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 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×