Repeat specific activity for a specific number of time


I am developing a bot where i am in situation where i need to perform a specific activity for a x number of times, where x is a variable.

Means just believe a situation where i need to send a hotkey for x no of time. here value of x changes every time. i.e. if X=3 then send hotkey activity should be performed 3 times. if X= 7 then send hotkey activity should be performed 7 times.

Please help me to develop this logic…

You can use ‘While’ activity by incrementing an integer variable.

  1. Add ‘While’ activity with condition i <= x, (where i your incrementable int variable and x is the number of times you want your loop to repeat. Start i by intizalizing with 0 or 1).
  2. Within the body of the While activity add your activities that you want to repeat.
  3. Add another ‘Assign’ activity that increments the integer variable. Ex. i = i +1.

Let me know if it helps.

Rammohan B.



Check attached file Main.xaml (5.6 KB)

1 Like

Thanks @Rammohan91 It worked for me


thank you so much @indra its became easy for me to understand by your attachment

1 Like