How to repeat a specific string of activities

Hi friends,

Long story short, I use UIPath to automate some things in a video game I play. I have a sequence that I run, and it runs 10 times, once for each character.

I use the click image activity to select the “Clothycaps” row, and then a string of 10 activities goes off. At the end of that sequence, I’m back at this menu, and use the click image activity to then select “Woodycaps” and then execute the exact same 10 activities. The menus and selection images don’t change per character, so I’ve literally copied and pasted the sequence of activities 10 times, with the only difference being the character selection in between the sequences. I then repeat for the remaining 8 characters.

Is there a more elegant way to call that function/sequence, rather than just having a list of 100 activities?

In my head, the easiest thing I can think of would just be something that allows me to put a bunch of activities in a “folder”, and then referring to that “folder” as an activity, but I don’t know of any way to do that.

Appreciate any feedback you guys might have! :slight_smile:

I waited to long to respond so I’ll just be editing my response in below haha

The sequence/group activity is exactly what I was looking for; now if I need to edit the sequence for whatever reason, I can just edit it once and copy paste. (And in the future, I think I can edit it once and then invoke the sequence… but I’ll figure that out later :slight_smile:)

Also definitely interested in learning more about dynamic selection, so I’ll take a look at those articles. Big thanks to both of you! :grin:

Hey @Joey_Sawyers,

Instead of putting all the 100 activities in a single sequence you can create 10 sequence of 10 activities. Let me explain you how:- Let suppose there is a process in which you have to login into a website, download some file from there and logout, so if I will perform all the task in a single activity it’s not easier to handle the code, to prevent the code from that issue what we can do is:-

  1. You create a sequence that will get the url and credential either from the orchestrator or from the configuration file with the out arguments.
  2. You create the login sequence with in arguments and put all the activities required for login in that sequence.
  3. You can create the file download sequence.
  4. You can create the logout sequence5.
  5. You can invoke all the sequence in one xaml sequentially.

Have a look on


1 Like

@Joey_Sawyers For repeating common thing we make single modle with help of Arguments.

In your case please check after click on Name what are requirements required for next steps.

2nd main thing you need a dynamic UR/ dynamic selector for Click on Name String.
Please check what is difference when we click on clothycaps and woodycaps.

If I designed this module.

1-Loop over string variable which contains 10 names
2- inside loop by dynamic selector/URl by putting current value of string.
3- click activity that using dynamic selector
4 then your all operations you want to perform. It can b module.
5.then redirect to this page.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.