Full list of system variables

<< Click to Display Table of Contents >>

Navigation:  Appendix >

Full list of system variables

Example of usageDescription

 

{ActiveRTConnections}Returns active RoboTask connections as JSON
{Add(17,8)}Adds the specified numbers
{AddressOnly(John Smith <j.smith@mydomain.com>)}Returns address only from full address
{Asc(©)}Returns ASCII code of specified character.
{AutomationStatus}Returns automation status of RoboTask (TRUE or FALSE)
{BatteryLife}The number of seconds of battery life remaining.
{BatteryPower}The percentage of full battery charge remaining.
{CapsLockState}Checks CapsLock state
{Chr(169)}Returns the symbol with specified ASCII code.
{ClipBoardContent}Clipboard content as Text
{CommaSeparatedToText("item 1","item 2","item 3")}Converts commaseparated string to multiline text
{ComputerName}Computer name
{CPULoad}CPU load in percent
{CurrentWindowCaption}Returns the title (caption) of current active window
{CurrentWindowClass}Returns the class name of current active window
{CurrentWindowHandle}Returns the handle of current active window
{Date}Current date
{DateIncDays(-7)}Current date ± number of days
{DateTime}Current date & time
{DateTimeToFormat({Date},yyyy-mm-dd)}Returns formatted date and time in specified format (*)
{Day}Current day
{DayOfTheYear({Date})}Returns the day of the year of specified or current date
{DayOfWeek}Current day of week
{DayOfWeekNo}Current day of week number
{DiskLoad(c:\)}Returns the disk load in percents
{Divide(36,5)}Divides the first number by the second
{DocumentsDir}Returns user documents folder
{DownloadsDir}Returns user downloads folder
{EnvironmentVar(Path)}Get environment variable
{Eol}End of line
{ExtractFileDrive(C:\Folder\File.ext)}Extracts file drive from full path
{ExtractFileExt(C:\Folder\File.ext)}Extracts file extension from full path
{ExtractFileName(C:\Folder\File.ext)}Extracts file name from full path
{ExtractFileNameNoExt(C:\Folder\File.ext)}Extracts file name without extension
{ExtractFilePath(C:\Folder\File.ext)}Extracts file path from full path
{ExtractFilePathNoDrive(C:\Folder\File.ext)}Extracts file path from root folder
{FileAttributes(C:\AUTOEXEC.BAT)}Returns attributes of file as string, like this: "AHRS"
{FileCreateTime(c:\autoexec.bat)}Date and time of file creation
{FileExists({TempDir}\file.tmp)}Check file existence
{FileLastAccessTime(c:\autoexec.bat)}Date and time of the last file access
{FilesCount({TempDir})}Returns the amount of files in specified folder
{FileSize(c:\autoexec.bat)}File size in bytes
{FileTime(c:\autoexec.bat)}Returns the time of last update of the file
{FolderExists({TempDir})}Checks folder existence
{FoldersCount({TempDir})}Returns the amount of folders in specified folder
{FolderSize({TempDir})}Returns the total size of files in specified folder (in bytes)
{FolderTime({TempDir})}Returns the time of last update of the folder
{FormatToDateTime(2014-02-19,yyyy-mm-dd)}Returns standard date and time from formatted string (*)
{FreeDiskSpace(c:)}Free disk space in bytes
{GetCurrentFolder}Returns full path of current folder
{GetTaskCurrentStatus(<ExtName>)}Returns task status as number by ID or External name. 0-Manual, 1-Idle, 2-Busy, 3-Running, 4-Stopping
{GetTaskExtNameById({TaskId})}Returns the task external name by task ID
{GetTaskIdByExtName({TaskExtName})}Returns the task ID by external name
{GetTaskLastError(<ExtName>)}Returns last task error message by external name or task ID
{GetTaskLastFinish(<ExtName>)}Returns last task finish time by external name or task ID
{GetTaskLastStartReason(<ExtName>)}Returns the task last start reason by external name or task ID
{GetTaskLastStartTime(<ExtName>)}Returns the task last start time by external name or task ID
{GetTaskLastSuccess(<ExtName>)}Returns last task finish state by external name or task ID. 0 - not started, 1 - success, 2 - not success
{GetTaskLastSuccessFinish(<ExtName>)}Returns last success finish time by external name or task ID
{GetTaskResult(<ExtName>)}Returns the result of task execution by external name or task ID
{GMTDateTime({DateTime})}Returns GMT date and time
{Hours}Current hours
{HttpClientIP}Returns client's IP address. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpCookie(CookieName)}Returns the cookie value of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpFilename}Returns the file name of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpHeader(Header-Name)}Returns the header of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpMethod}Returns the method of an HTTP request (GET, POST, etc.). Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpPath}Returns the path of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpPostParam(ParamName)}Returns the post parameter value of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpQuery}Returns the query string of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpQueryParam(ParamName)}Returns the query parameter value of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{HttpRAWHeaders}Returns RAW headers of an HTTP request. Works only with the "WebSocket Server HTTP On Request" trigger.
{IncDays(-1)}Current day ± number of days
{IncMonths(-1)}Current month ± number of months
{IncYears(-1)}Current year ± number of years
{IPAddress({ComputerName})}Returns IP address by computer name
{IsError}Returns "True" when error occurred at previous step
{IsFileFree(c:\autoexec.bat)}Checks file for free access
{IsProcessExists(notepad.exe)}Checks existence of process in memory
{IsWindowActive(Notepad)}Check if the window is active
{IsWindowHidden(Notepad)}Returns "True" if window invisible
{IsWindowMaximized(Notepad)}Returns "True" if window maximized
{IsWindowMinimized(Notepad)}Returns "True" if window minimized
{IsWindowVisible(Notepad)}Returns "True" if window visible
{IsWSClientActive(ID)}Returns if WebSocket client is active
{IsWSServerActive(ID)}Returns if WebSocket server is active
{LastDateOfTheMonth({Date})}Returns the last date of the month of specified date
{LastErrorCode}Error code. Parameter of error handling task.
{LastErrorDescription}Error description. Parameter of error handling task.
{LastErrorStep}Error step number. Parameter of error handling task.
{LastErrorTaskExternalName}External name of error task.  Parameter of error handling task.
{LastErrorTaskID}Error task ID. Parameter of error handling task.
{LastErrorTaskName}Error task name. Parameter of error handling task.
{LogFileName}Log file name (only works in the context of a task)
{LogFolder}Folder of logs
{LowerCase(Sample String)}Converts a string to lowercase.
{MemoryLoad}Memory load in percent
{Minutes}Current minutes
{MonitorCount}Number of Monitors
{MonthIncDays(-1)}Current month ± number of days
{MonthName}Current month name
{MonthNo}Current month number
{MouseLeftBtn}The status of LEFT mouse button
{MouseMiddleBtn}The status of MIDDLE mouse button
{MouseRightBtn}The status of RIGHT mouse button
{MouseX}X-pos of mouse pointer
{MouseY}Y-pos of mouse pointer
{mSeconds}Current milliseconds
{Multiply(3,4)}Multiplies the specified numbers
{NumLockState}Checks NumLock state
{OnBattery}True - if computer on battery; False - power is online
{PicturesDir}Returns user pictures folder
{ProcessID}Self process ID of RoboTask
{RandomString(32)}Returns random string of the specified length (default length 32)
{RandomValue(1000)}Returns random integer value between 0 and parameter (default 1000)
{RoboTaskVersion}Returns RoboTask product version
{ScreenBottom(0)}Bottom edge of specified screen
{ScreenH(0)}Height of specified screen
{ScreenHeight(0)}Height of specified screen
{ScreenLeft(0)}Left edge of specified screen
{ScreenRight(0)}Right edge of specified screen
{ScreenTop(0)}Top edge of specified screen
{ScreenW(0)}Width of specified screen
{ScreenWidth(0)}Width of specified screen
{ScrollLockState}Checks ScrollLock state
{Seconds}Current seconds
{ShortDayOfWeek}Current day of week short name
{ShortMonthName}Current month short name
{ShortYear}Two-digits current year
{ShortYearIncDays(-1)}Two-digits current year ± number of days
{StartTime}RoboTask start date and time
{StrLength(Sample String)}Returns the length of specified string.
{Subtract(24,7)}Subtracts the second number from the first
{SystemDir}Windows system directory
{TaskCategoryID}Category ID of current task (only works in the context of a task)
{TaskComment}Task comment (only works in the context of a task)
{TaskExtName}External name of current task (only works in the context of a task)
{TaskFileByID({TaskId})}Task filename by ID
{TaskFileName}Task file name (only works in the context of a task)
{TaskFolder}Folder of tasks
{TaskID}ID of current task (only works in the context of a task)
{TaskLogFileById({TaskId})}Task log filename by ID
{TaskName}Name of current task (only works in the context of a task)
{TaskStatus}Returns task status as number (works only in task context). For internal use
{TempDir}Temporary directory
{TextFile(file_name)}Contents of text file
{TextFileANSI(file_name)}Reads the text file as ANSI text and returns the text
{TextFileUNICODE(file_name)}Reads the text file as UNICODE text and returns the text
{TextFileUTF8(file_name)}Reads the text file as UTF8 text and returns the text
{TextToCommaSeparated(Line 1{EOL}Line 2)}Converts multi-line text to comma separated string
{Time}Current time
{TotalDiskSpace(c:\)}Returns the total size of specified disk (in bytes)
{UniqueFileName({TempDir}\*.tmp)}Returns unique random file name by the mask
{UpperCase(Sample String)}Converts a string to uppercase.
{UpTime}Up time of RoboTask
{UrlFilename(URL)}Return the file name of a specified URL
{UrlHost(URL)}Returns the host of a specified URL
{UrlPath(URL)}Returns the path of a specified URL
{UrlPort(URL)}Returns the port of a specified URL
{UrlProtocol(URL)}Returns the protocol of a specified URL
{UrlQuery(URL)}Returns the query part of a specified URL
{UrlQueryParam(URL, ParamName)}Returns the query parameter value of a specified URL
{UserName}User name
{UTF8Decode(<Put UTF8 string here>)}Decodes string from UTF8 format
{UTF8Encode(Привіт світ!)}Encodes string to UTF8 format
{ValidFileName(c:\"My<Invalid:File*Name>.txt")}Returns valid file name
{ValidVariableName(Some wrong String)}Returns valid variable name from custom string
{VolumeLabel(c:\)}Returns the label of specified volume
{WeekOfTheYear({Date})}Returns the week of the year of specified or current date
{WinDir}Windows directory
{WindowCaption({CurrentWindowHandle})}Returns the title (caption) of specified window handle
{WindowClass({CurrentWindowHandle})}Returns the class name of specified window handle
{WindowExists(Notepad)}Check window existence
{WorkingSet({ProcessID})}Memory working set of process (KBytes)
{Year}Current year
{YearIncDays(-1)}Current year ± number of days

 

 

 

(*) Format options for format variables:

d Displays the day as a number without a leading zero (1-31).
ddDisplays the day as a number with a leading zero (01-31).
mmDisplays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
yyDisplays the year as a two-digit number (00-99).
yyyyDisplays the year as a four-digit number (0000-9999).
hDisplays the hour without a leading zero (0-23).
hhDisplays the hour with a leading zero (00-23).
nDisplays the minute without a leading zero (0-59).
nnDisplays the minute with a leading zero (00-59).
sDisplays the second without a leading zero (0-59).
ssDisplays the second with a leading zero (00-59).
am/pmUses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
a/pUses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.