Use Repeat Count to Repeat an Action or Whole Script

The Repeat Count field allows you to repeat Macro or Script Execution. Let’s create 2 different Scripts and learn how to use the Repeat Count field to Repeat Macro Action Execution or even Repeat the whole Script Execution itself.

Repeat Count of the Whole Script

The Repeat Count of whole Script is a Numerical field with default value of 1 and is located at the Right Corner of the Software below the Save Button as displayed in the Screenshot below. Note that the default value of the Repeat Count is assigned as 1. You can change the Repeat Count to any numerical value.

Repeat Count to Repeat Script Execution

Repeat Count to Repeat Script Execution

When the above Script is executed, 2 Automated Left Mouse Clicks will be performed by the Script and Script will stop Execution. Now Let’s say we change the Repeat Count of the Script to 10 as displayed in the screenshot below and then execute the Script.

Repeat Count assigned a value of 10 to Repeat Whole Script Execution 10 times

Repeat Count assigned a value of 10 to Repeat Whole Script Execution 10 times

When a Script is executed with value of more than 1 assigned, it executes all the Macro Actions and then Starts all over again controlled by the Script Repeat Count. This time given below process will be followed by the Script execution:

  1. Left Click Number 1 will be done by the Software.
  2. Left Click Number 2 will be done by the Software.
  3. Now since the Script Repeat Count is assigned as 10, the whole Script Execution (composed of 2 Left Clicks in sequence) will be done 10 times.
  4. Execution will run like this Click 1, Click 2, Click 1, Click 2,Click 1, Click 2,Click 1, Click 2,Click 1, Click 2,Click 1, Click 2,Click 1, Click 2,Click 1, Click 2,Click 1, Click 2,Click 1, Click 2.

Repeat Count of the a single Macro Action in the Script

Repeat Count of any Macro Action can be assigned a Repeat Count of more than 1 to Repeat it. Let’s create a simple Script to illustrate the usage and behavior of the Repeat Count parameter of any Macro Action in the Script. You can use the Edit Parameter Screen to Edit Repeat Count of any Macro Action in the Script. Note that the Second Left Click Action in the given below Screenshot has been assigned Repeat Count as 2 instead of 1.

Repeat Action Execution with Repeat Count of any Macro Action

Repeat Action Execution with Repeat Count of any Macro Action

When the above Script is executed, the Script Execution will effectively perform 4 Clicks in the given below order

  1. Wait for 100 Milli Seconds as configured in Left Click Number 1 and then Execute Left Click Number 1
  2. Wait for 100 Milli Seconds as configured in Left Click Number 2 and then Execute Left Click Number 2
  3. Repeat Step 2 Above due to Repeat Count value assigned as 2
  4. Wait for 100 Milli Seconds as configured in Left Click Number 3 and then Execute Left Click Number 3

Only the Second Left Click has been assigned a Repeat Count of 2 and other Left Clicks have been assigned Repeat Count of 1 and hence, the Left Click Number 2 will be executed 2 Times and then the control will come to Left Click Number 3 and execute it.