System Variables - Specific to System Settings/Parameters
- Dernière mise à jour2020/05/06
System Variables - Specific to System Settings/Parameters
You can use system-related system variables to include parameters in your automation task that are related to a particular computer.
The variables return actual system settings and parameters, such as RAM, CPU/RAM usage, and total RAM.
Common Use Case
These variables are useful when the performance of a system needs to be tracked during an activity; for instance load testing.
The following matrix provides description and the system variable's possible uses:
Variable | Description | Example |
---|---|---|
Machine | Returns machine name | You can use it in the Log to File command to log the name of the machine on which the Bot was executed. |
Clipboard | Returns clipboard text data | You can use it in Clipboard to copy or in Message command to display the text that is copied to the clipboard. |
System | Returns name of the system | You can use it in Log to File command to log the name of the system on which the Bot was executed. |
AAApplicationPath | Returns the application path of the product | You can use it in Run Task command to select the task from an application path. |
AAInstallationPath | Returns the installation path of the product | You can use it in Message command to display or in Log to File command to log the installation path of AAE Client. |
AATaskName | Returns the name of the task being played along with its path | You can use it in Comment/Message command to display the name of the task with its application path. |
AATaskExecutor | Returns the name of the user who executed the task from the Client or Control Room | You can use it in a notification to know who executed the automation and from where did it originate. |
AAControlroom | Returns the URL of the Control Room the Bot is connected to | You can use it in Email Automation command to send the URL of the Control Room the Bot Runner is connected to. |
CPUUsage | Returns the CPU usage stats in percentage | You can use it in Log to File command to log data of CPU usage for a particular operation within the Bot (Task) while it was executed. |
RAMUsage | Returns the RAM usage stats in MB | You can use it in Log to File command to log data of RAM usage for a particular operation within the Bot (Task) while it was executed. |
TotalRAM | Returns the total amount of RAM in MB | You can use it in Log to File command to log data of Total RAM available in the system. |
OSName | Returns the name of the Operating System | You can use it in Log to File command to log the name of the Operating System (OS) used in the system on which a Bot (Task) was executed. |
ArrayRows | Returns the number of rows for selected Array Variable | You can use it in If command with variable conditions based on the number of rows in the Array Variable. |
ArrayColumns | Returns the number of columns for selected Array Variable | You can use it in If command with variable conditions based on the number of columns in the Array Variable. |
WorkItem | Returns the data in read only form for individual attributes of a selected queue | You can use it only in the Insert Work Item command when you want to read attributes of the selected queue. |
Steps to select System Related Variables:
- Click F2 and you will see Insert Variable window.
- Select the required variable and click Insert.Note: Do not confuse System Related Variables with System Variables. To select System from System Related Variables, refer the following section.
Steps to select System from System Related Variables
- Click F2 and you will see Insert
Variable window.
- Select System and click Insert, a pop up window for
System Variable Option is displayed. Note: The COMPUTERNAME system variable returns first 15 characters of the computer name in uppercase.
- Click OK and insert the system variable.
Troubleshooting an error
Error: If you use the $CPUUsage$ variable in a message box and an error message is issued, you need to reset the counter for the system by performing the following action:
Open a command prompt and enter the following two commands:
cd\windows\system32 [enter]
lodctr /R [enter]
Examples
When creating an executable file (EXE) for a task, you might want to use the path of the EXE to log a file or refer to a file located in a folder. In this case, use the AAApplicationPath variable to select the path of the EXE from any location in which it is stored. This eliminates the need to use static paths for EXEs.
-
The following command stores the current application path in a log file. Drag and drop a Log To File command to your task, and press the F2 key to insert $AAApplicationPath$ variable:
Log to File:Automation Anywhere Application Path:$AAApplicationPath$ in "C:\Variable Operation.txt"
-
The following command stores the current RAM usage and CPU usage in a log file. Drag and drop a Log To File command to your task, and press the F2 key to insert $RAMUsage$ and $CPUUsage$ variables.
Log to File: CPU Usage:$CPUUsage$RAM Usage:$RAMUsage$ in "C:\Variable Operation.txt"
-
The following command stores the current Task path in a log file. Drag and drop a Log To File command to your task, and press the F2 key to insert $AATaskName$ variable.
Log to File:Automation Anywhere Application Path:$AATaskName$ in "C:\Variable Operation.txt"