- 已更新： 2022/04/21
Use this command to repeat a sequence of commands.
- Start Loop
- Starts the loop. Select from the following options:
- Times: loops for a number of times.
- List: loops through a list.
- Condition: runs actions based on an existing
Optionally, add a Wait time for the condition to become true.
- Each Row in an Excel Dataset: used in conjunction with the Get Multiple Cells operation of the Excel command. When you have retrieved a range of cells from Excel, the rows and columns of the range are stored in the system variable $Excel Column$.
- Each Row in an Internet Explorer Table: used in conjunction with the Extract Table operation of the Web Recorder command. When you extract a table by using the Web Recorder Extract Table command, the rows and columns of the table are stored in the system variable $Table Column$.
- Each Row in an SQL Query Dataset: used in conjunction with Database commands. When you issue an SQL query using the Database SQL Query command, the result set for the SQL query is stored in the system variable $Dataset Column$.
- Each File in a Folder: used to perform an action on
all files in a folder. You can obtain information about the files and folder by using the following system variables:
Note: The order of the returned filenames is not guaranteed.
- $FileName$ - Use this variable to obtain the name of a file.
- $Extension$ - Use this variable to obtain a file's extension.
- $CurrentDirectory$ - Use this variable to obtain the path of the folder in which the files are stored.
- Each Folder in a Folder: used to perform an action on one or more folders. To access the folder name within the loop, use the system variable $FolderName$.
- Each Row in a CSV/Text File: used to loop through each row in a CSV or text file.
- Each Email Message on Server: used to perform an action on each message that resides on your mail server. You might use this command to save mail attributes, such as Subject, Message, To:, Cc:, and Attachment.
- Each Node in an XML Dataset: used to loop through each node of an XML data set to obtain values from multiple nodes.
- End Loop
Ends the loop. The actions that exist between the Start Loop and End Loop commands will repeat based on the type of loop you have selected.
Whenever you insert a Start Loop command, an End Loop command is also inserted. If the End Loop is mistakenly deleted, you can insert an new one.
- Exit Loop
Breaks out from a loop when a particular action or condition occurs. The Exit Loop command can exist only between the Start Loop and End Loop commands.
Continues the next iteration of a loop when a particular action or condition occurs. When a Continue Loop command is reached, the commands up to End Loop are skipped and the next iteration of the loop is run.