About Activities
Activities are the basic building blocks of an automation project, each representing one or more manual tasks that StudioX can automate. A sequence of related, interconnected activities makes up an automation project. When you consider automating a repetitive process, you must first break down that process into each of the individual manual steps you take, and then identify the activities in StudioX that automate each of those steps.
For example, let’s say that you want to automate the following workflow:
- Open a spreadsheet.
- Open a business application
- Copy the data from a cell in the spreadsheet.
- Paste the copied data into a field in a business application.
- Click a button in the application to submit the data.
When you create a project in StudioX to automate that process, you use the following activities:
- Use Excel File to indicate which spreadsheet you want to use.
- Use Application/Browser to indicate which application you want to use.
- Type Into to select the input field in the business application where to copy the data as well as the cell from which you want to copy the data.
- Click to indicate which button to click to submit the data in the business application.
There isn’t always a one-to-one relationship between a manual step and a StudioX activity. As you can see in the above example, the Type Into activity covers two manual steps because you use it to indicate both the source and the destination of the copied text.
Container Activities
Container activities define a scope or the conditions to be met for the execution of the activities added inside them. A container activity can be described as a parent activity that contains one or more child activities. Examples of container activities include:
- Resource activities - Add an application resource to the automation and make that resource available to the activities added inside them.
- For Each activities - Define a collection of items and repeat the activities added inside them once for each of those items.
- Repeat number of times - Similar to a For Each, but it repeats the activities added inside it for a specified number of times.
- If, Switch, and Check App State - Evaluate a condition and determine the flow of the automation by executing specific activities added inside them based on the result of the evaluation.
- Wait for Download - Detects a file download initiated by the activities added inside it and makes the file available in the automation.
Resource Activities
Activities are grouped into categories based on the application they apply to. Before you can automate tasks you perform in an application, you must first add the required application resource to the automation. The following activities add resources to your automations:
- Use Excel File - Use a specified Excel file. The data in the Excel file is available to all the activities added inside this activity. When you configure child activities, you can select individual cells, ranges, or sheets in the file directly from StudioX.
- Use Desktop Outlook App, Use Outlook 365, and Use Gmail add a desktop Outlook, Outlook 365, and Gmail account to the automation. The emails in the account are available to all the activities added inside this activity. When you configure child activities, you can select individual folders, messages, or message fields directly from StudioX.
- Use Word File - Use a specified Word document. Add the activities to perform on the file inside this activity.
- Use Application/Browser - Use a specified desktop application or web browser page. Add the activities to perform in the application or web browser inside this activity.
- Use PowerPoint Presentation - Use a specified PowerPoint file. Add the activities to perform on the file inside this activity.
You can add as many resources as your automation requires. For activities that use more than one application, add the resources one inside the other. For example:
- To add activities that use both data from an Excel file and emails from an Outlook account, add a Use Excel File activity inside a Use Desktop Outlook App activity, and then add the common activities inside Use Excel File.
- To add activities that use both data from a web page and a Word document, add a Use Application/Browser activity inside a Use Word File activity, and then add the common activities inside Use Application/Browser.
Adding Global Resources to the Automation
When you add a resource to the automation using a resource activity, the resource is only available to the activities added inside the resource activity. To make a resource available to all the activities in a project, you can add the resource globally by connecting the project to the resource. Global resources are managed from the Data Manager panel, not added as activities to the project. This means that connecting the project to a resource also helps save space in the Designer panel.
For information on how to connect a project to an Excel workbook, see Connecting a Project to an Excel File.
Iterating through Items
Iterating refers to repeating one or more activities in your automation project for each individual item in a collection of items. To iterate through items, add one of the available For Each activities in which you define the collection, and then add the activities to repeat inside the For Each. When you configure the activities to repeat, indicate that an activity should use data from each item in the iteration by selecting the current item option from the Plus
menu.
StudioX comes with the following For Each activities:
- For Each Excel Row - Repeat one or more activities for each row in an Excel table, range, or sheet.
The current item option isCurrentRow
. For some activities, you must also select which column to use from the current row. - For Each Excel Sheet - Repeat one or more activities for each sheet in an Excel file.
The current item option isCurrentSheet
. - For Each Email - Repeat one or more activities for each message in an Outlook folder, Gmail label, or in a selection of messages.
The current item option isCurrentMail
. For some activities, you must also select which field to use from the current mail: Subject, Body, Body as HTML, Bcc, Cc, To, From, or Priority. - For Each File in Folder - Repeat one or more activities for each file in a folder on your computer.
The current item option isCurrentFile
. You must also select which file property to use from the current file: Size, Name, Full Name (includes full path), Folder, Last modified date, Last accessed date, Created date, IsReadOnly, or Size in KB.
To make it easier to identify when configuring activities added inside a For Each, you can rename the current item option using a name that describes the items you are iterating through.
Configuring the Data Used by Activities
Activities can receive data as input and, upon execution, they can generate output data. You configure the data for each activity using the Plus menu available on the right side of data fields.
Depending on its purpose, an activity can have no data fields, one, or multiple data fields. The following information describes the options you can find in the Plus menu. Because the menu displays options that are relevant in the context of each field, activity, and parent activity, only a subset of the options is available for each field.
Options for Input Fields
Input fields define the data received by an activity using the following options:
- Data from resources added to the project:
- Excel - Data from the Project Notebook or from an Excel file added to the automation. Select named cells, named ranges, tables, or sheets directly from the Plus menu, or select Indicate in Excel to open the workbook in Excel and indicate in it. Selecting Custom Input lets you manually enter sheet names, table names, cell addresses, or range addresses. If the activity is inside an For Each Excel Row activity, you can select the current row in the iteration.
- Outlook / Gmail / Outlook 365 - Data from an email account defined for a parent mail resource activity. You can use the message selected in the Outlook desktop app when the project is executed or, if the activity is inside a For Each Email activity, the current email in the iteration.
- PowerPoint - Data from a PowerPoint presentation defined for a parent Use PowerPoint Presentation activity. You can select slides, placeholders, slide masters, or layouts.
- File - If the activity is inside a For Each File in Folder activity, you can use properties of the current file in the iteration.
- Text - Enter text using the built-in text builder. You can click Plus inside the Text Builder to add Excel data, mail data, or values you saved for later use to the text.
- Number - Enter a numeric value or a formula. Formulas support the following operators and symbols:
+
(addition),-
(subtraction),*
(multiplication),/
(division),^
(exponent, for example 2^3 for 2 raised to the power of 3),( )
(to enforce the order of operations).
You can click Plus inside the Numeric Calculation window to add numeric values from the project. For example, select a cell in an Excel file, or a numeric value that you saved for later use. - Condition Builder - Add conditional statements that are used to determine what activities to execute based on whether or not the conditions are met. For example, the If activity contains a condition field, and it executes a series of activities if the condition is met and, optionally, another set of activities if the condition is not met.
You create a conditional statement by selecting two values and comparing them using one of the available operators: greater than, greater than or equal, less than, less than or equal, equal to, not equal to, is empty, is not empty, is true, is false, starts with, ends with, contains, is numeric, is not numeric.
You can add multiple statements and select if all of the statements or any of the statements must be true for the condition to be met. - Use Saved Value - Use the output of another activity that you saved for later use in the project as input for the current field.
- Choose Date/Time - Select a date from the calendar or a time (hour, minute). This option is available for date and time fields.
- Choose Duration - Select a duration (hours, minutes, and seconds). This option is available for duration fields.
- Ask when run - Prompt for a value during project execution, This option is available for fields that accept text, numeric, date/time, or Boolean (True/False) values.
- Paste from clipboard - Use an output value that you copied to the clipboard in another activity as input for the current field. This option is available for fields that accept text values or Excel ranges.
- Variables - Select a variable created for use in App/Web activities selectors.
- Open in Advanced Editor - Enter VB expressions.
- Clear Value - Clear the current selection in the field.
Options for Output Fields
Output fields define what to do with the data generated by an activity using the following options:
- Excel - Save output to the Project Notebook or an Excel file defined for a parent Use Excel File activity. Select named cells, named ranges, tables, or sheets directly from the Plus menu, or select Indicate in Excel to open the workbook in Excel and indicate in it. Selecting Custom Input lets you manually enter sheet names, table names, cell addresses, or range addresses. If the activity is inside an For Each Excel Row activity, you can select the current row in the iteration.
- Save for Later Use - Save the output for later use in your automation and enter a name by which to refer to it in the project. The saved value can then be selected as input in another activity.
- Copy to clipboard - Save the output to the clipboard. You can then paste the value in an input field in another activity. This option is available for fields that output text, Boolean values (True/False), numbers, or Excel ranges (for example, the Destination field in the Copy Range activity). Boolean and number values are converted to text when copied to the clipboard.
- Rename Saved Value - Rename a value you saved for later use.
- Variables - Select a variable created for use in App/Web activities selectors.
- Open in Advanced Editor - Enter VB expressions.
- Clear Value - Clear the current selection in the field.
Using the Output of an Activity as Input for Another Activity
Passing data from one activity to another can be very useful, even essential when trying to achieve certain workflows. StudioX enables you to save the output generated by an activity, and then use it as input in other activities later in the project:
- To save data for use in other activities, select the Save for Later Use option in the Plus menu of a field that configures the output data of an activity, and enter a name for the saved value. You will use this name later to identify and select the value as input in another activity, so make sure to use a unique name that describes the saved value.
- To use the saved data as input for another activity later in the project, select the value from the Use Saved Value option in the Plus menu of a field that configures the input data of an activity.
There are various scenarios in which this feature can be useful. Here are a couple of examples:
- A Read Text File activity reads and outputs the contents of a text file which can then be used as the input for an Append Text activity to add the text to a Word file.
- A File Exists activity checks whether a file exists and outputs the result (True or False) which can then be used in the condition of an If activity to determine specific actions to perform when the file already exists.
Running Your Automations
We recommend running your automations frequently during the design stage. This enables you to verify that the project works as expected and lets you identify potential errors early.
To run an automation, click Run in the StudioX ribbon or press F5 on your keyboard.
You can stop project execution by clicking Stop in the ribbon or pressing F5 on your keyboard. After the project is executed, a message displayed at the top of the Designer panel informs you if the run was successful or not.
To run only parts of your project, right-click any activity and select:
- Run to this Activity to execute all the activities in the project before the activity.
- Run from this Activity to execute all the activities in the project starting with the activity.
Running in Picture-in-Picture
If you want to use your computer during project execution without interference from the Robot, you can run your automation in picture-in-picture mode. This executes the project in another session opened in a separate window, leaving you in full control of the keyboard, mouse, and screen.
To run an automation in picture-in-picture, click the arrow next to Run in the StudioX ribbon, and then select Run in PiP. Alternatively, you can press F6 on your keyboard. The Robot starts executing the activities in the project in a new window.
Note:
Automations that use Microsoft Office resources do not run successfully in picture-in-picture if the resources are already open in the main session. Before you run an automation in picture-in-picture, close any PowerPoint, Excel, or Word file that is accessed by the automation, and make sure to close the Outlook desktop application (not just minimize it to the taskbar/notification area) if an Outlook account is used in the automation.
Updated about a year ago