![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
We are using AA 4.0 standard version. Please consider the following demo task: >Open "Notepad.exe" >Loop While $counter$ less than or equal to "4". > Keystroke: $counter$ in "Untitled-Notepad" >End Loop > Start Loop "4" Times > Keystroke: $counter$ in "Untitled-Notepad" >End Loop this example has two Loops both loops are running indefinitly. |
| |||
|
Disclaimer: I am a complete noob to Automation Anywhere. The only reason I'm replying is because I still might have a half-way decent answer for you. I haven't played with loops in Automation Anywhere yet, but in order for a loop to work the counter needs to advance each time the loop makes a run. The following is pseudo-code, but it should give you an idea. Code: $counter = 0
Loop while $counter < 4
print $counter
$counter = $counter + 1
End loop |
| |||
|
Hello, System variable, counter increments by 1 when used within the loop so counter can only be used within the loop not in the Loop Condition command itself. However, you can use it in loop for number of times command. Following is the text format of commands, if you want to loop for 4 times, Start Loop "4" Times //write commands according to your requirement End Loop We have also attached task file (loopForTimes.atmn) for your convenience. You can copy it under following location, My Documents\Automation Anywhere\Automation Anywhere\My Tasks Hope that helps. |
![]() |
| Thread Tools | |
| Display Modes | |
| |