Talk to our expert and start your robotic adventure
How to record a macro?
You already know the basic theory about macro recording, so it is time to move on to practice. To record a macro, press the red Record (1) button.
From now on, the robot will record all actions that you perform: mouse clicks, keyboard shortcuts, opening a file or an application.
During the recording there are 3 functions available:
After clicking “Stop”, the robot will start processing the saved actions. The processing time depends on the complexity of the steps, their number and the technical parameters of your computer.
Important: The robot has a built-in website browser but supports also Google Chrome. To use it, choose Open new Chrome tab.
Additionally, by selecting Open application, a field for entering the parameters of a given application will be displayed (5). It allows you to enter parameters for a given application, e.g. automatic launching of a new message window in Outlook and setting its content and subject. Read more about application opening parameters here.
You can name a block (1) and add a note to it (2). To open the block, press the check mark (3). From then on, all steps will be recorded within the block.
Example: If a macro consists of many different operations, some of the steps, e.g. concerning one process, can be grouped into a block. Below we have arranged into a block all the steps involved in the process “Logging into system X”.
To close the block, press the button “End block” / “STOP” (7)
Important: Once the block is finished, the macro does not stop recording. If you want to create blocks manually after the recording has finished, you can do this in the advanced view.
After clicking on Append condition, a form to define it will appear. In the Expression field (1), enter a condition in a predefined scripting language. so knowledge of the language (Beanshell/JavaScript) is required. A simplified way of creating conditional steps is described in the article “How to add a conditional step?”
Below we describe the creation of a condition in record mode based on the above example with sending an email:
${xxx}.equals(email contact)
In the Variables (2) field, a list of variables used in the macro is displayed. You can click on such a variable and it will be automatically entered in the Expression field. In the Notes field (3) you can enter a text describing the condition assigned to it.
The opening of the conditional block is confirmed by pressing the check mark (4). From now on the steps will be recorded within the conditional block.
Important: Conditions can be combined and extended in different ways. An example of the use of combined conditions could be a macro which task is to generate documents for company employees aged 18-25. To create such a macro, the conditions “age greater than 18” and “age less than 25” would have to be combined.
To close the condition press the End condition / STOP button (7). Once the conditional block is finished, the macro does not stop recording. If you want to create blocks manually after the recording has finished, you can do this in the STUDIO or SERVER robot view.
Example: If you have an Excel sheet with employee data that you want to apply to individual PDF documents, simply record loops on the first row. The robot will move the data from the application to the file until it hits an empty row in the application. The robot recognises a dataset, in this case in an Excel sheet, and will propose to create a loop on the dataset automatically recognising its range.
Important: when recording, perform actions only in the application that participates in the loop, and always start loop recording from the point where
the process starts. For the above example:
The robot repeats these actions for the remaining records in the database. Once the loop is finished, the macro does not stop recording. If you want to create loops manually after the recording has finished, you can do this in the robot’s advanced view on the STUDIO or SERVER license.