You can use the following variables and functions in your task:

 

System directories:

{WindowsDirectory} - full path to the Windows directory
{SystemDirectory} -  full path to the Windows\System32(64) directory
{ProgramFilesDirectory} -  full path to the Program Files (Program Files x86 on Windows 64-bit ) directory
{LocalAppDataDirectory} - full path to the Application Data directory
{UserAppDataDirectory} - full path to the current user Application Data directory
{CommonAppDataDirectory} - full path to the Common Application Data directory
{UserDocumentsDirectory} - full path to the current user documents directory
{CommonDocumentsDirectory} - full path to the Common Documents directory
{TaskFileDirectory} - directory where task file in located

 

Interim results of the task:

{LastProcess} - recently run program or command
{LastProcessExitCode} - result code of the last running program or command. Available only in the case when the program starts with a flag "Wait for termination". Otherwise equal to "1" (most of the programs and commands, if implemented, return "0")
{LastDialogResult} - ID of the last pressed button in the dialog
{LastDialogField("field_id")} - returns the value of the field of dialog by its  ID
{LastControl} - recently found control
{LastResult} - flag of the last step success
Avaliable values:
"OK" - if successful
"FAILED"- in step error

 

String functions:

If the string starts or ends with a space, enclose it in quotes (" ").

{StrStarts(abcdef, abc)} - checks that the string starts with a certain substring
{StrEnds(abcdef, def)} - checks that the string ends with a certain substring
{TextStarts(ABCDEF, abc)} - checks that the text begins with a specific fragment (case insensitive)
{TextEnds(abcdef, DEF)} - check that the text ends with a specific fragment (case insensitive)
{StrContains(abcdef, bc)} - checks that the string contains a substring
{TextContains(ABCDEF, de)} - checks that the text contains a specific fragment (case insensitive)
{StrFileName("C:\documents\file.txt")} - extracts the file name
{StrFileNameNoExt("C:\documents\file.txt")} - extracts the file name without extension
{StrFileExt("C:\documents\file.txt")} - extracts the file extension
{StrFilePath("C:\documents\file.txt")} - extracts the file path
{StrFileDrive("C:\documents\file.txt")} - extracts drive
{Trim("   ABCDEF   ")} -  extracts the string with no spaces in the beginning and end
{Split (string, [delimiter=" "], [maxSplit])} - split string into multiple strings, separated by a specified character (delimiter) (space (" ") by default). Parameter maxSplit allows you to limit the number of result strings
{StrReplace(string, Substing, ToString)} - replaces Substrings to ToString in the string

 

Lists and ranges:

{Range(1, 10)} - list of numbers from a given range
{StringList("asd", "hgf", "kj")} - string list
{ChildControlList({LastControl})} - list of nested (child) objects
{VisibleChildControlList({LastControl})} - list of child objects visible on the screen
{ChildControlListByName({LastControl}, "name1", "name2", "name3")} - list of child objects with the given names

 

File lists:

{FileList("c:\*.*")} - list of files corresponding to the mask
{FileListRecursive("c:\*.*")} - list of files, including files in subdirectories
{DirectoryList("c:\*.*")} - list of directories corresponding to the mask
{DirectoryListRecursive("c:\*.*")} - list of directories, including subdirectories

 

Arithmetic:

{Summ(2, 2)} - sum of two or more elements
{Sub(9, 8)} - subtraction of one or more values
{Mul(3, 8)} - multiplication of two or more elements
{Div(3, 2)} - division of one value to another
{Round(2.5)} - rounding to the nearest whole

 

Comparison operators:

{Equal(a, b)} - equality
{Differ(a, b)} - difference
{Less(3, 5)} - less
{LessOrEqual(2, 5)} - less or equal
{Greater(3, 5)} - greater
{GreaterOrEqual(5, 6)} - greater or equal

 

GUI object properties:

{ControlModule({LastControl})} - executable file name
{ControlModuleSize({LastControl})} - size of the executable program
{ControlName({LastControl})} - control name
{ControlClass({LastControl})} - control class
{ControlRole({LastControl})} - control role (type)
{ControlText({LastControl})} - control text
{ControlValue({LastControl})} - control value
{ControlWidth({LastControl})} - control width
{ControlHeight({LastControl})} - control height
{ControlScreenRect({LastControl})} - control rectangle (x1,y1,x2,y2) on the screen
{ControlDefaultAction({LastControl})} - control default action name
{ControlDescription({LastControl})} - control description
{ControlShortcut({LastControl})} - control shortcut
{ControlParent({LastControl})} - get parent control
{ControlRoot({LastControl})} - get root control (usually the main window)

 

Controls management functions:

{ControlFocus({LastControl})} - set focus on control
{ControlDoDefault({LastControl})} - do default control action
{ControlSelect({LastControl})} - select control
{ControlUnselect({LastControl})} - unselect control
{ControlCheck({LastControl})} - set checkbox
{ControlUncheck({LastControl})} - unset checkbox

 

Read/write to file functions:

{WriteTextToFile({content}, "file.txt"})} - write text to the file
{AppendTextToFile({content}, "file.txt"})} - append text to the file
{ReadTextFromFile({content}, "file.txt"})} - read text from the file

 

Date and time functions:

The format of the date and time is specified by settings on your computer.

You can call {Now} to see date and time format, for example, in step "Dialog".

{Now} - current date and time
{Date} - current date
{Time} - current time
{DateValue("10.12.2010 10:02:23")} - extracts date from the {Now} format string
{TimeValue("10.12.2010 10:02:23")} - extracts time from the {Now} format string
{Year("10.12.2010")} - extracts year from the {Date} format string
{Month("10.12.2010")} - extracts month from the {Date} format string (from 1 to 12)
{Weekday("10.12.2010")} - calculate week day number from the {Date} format string (from 1 to 7)
{Day("10.12.2010")} - extracts day from the {Date} format string (from 1 to 31)
{Hour("10:02:23")} - extracts hour from the {Time} format string (from 0 to 23)
{Minute("10:02:23")} - extracts minutes from the {Time} format string (from 0 to 59)
{Second("10:02:23")} - extracts seconds from the {Time} format string (from 0 to 59)