The keywords
P1,P2,P3 refer to parameters of the macro which are defined in the description.If the name is not known then the entire block with braces is unchanged:
{unknown:P1,P2} → {unknown:P1,P2}.Environment
| Name | DirectGVR Version | Description |
|---|---|---|
{env:P1} | 3.4 | Returns the value of the environment variable (P1). |
{env:P1,P2} | 7.1 | Returns the value of the environment variable (P1) or optionally defaults to (P2) if not found. |
Executable/Package
| Name | DirectGVR Version | Description |
|---|---|---|
{fileVersion:P1} | 3.4 | Returns the file version of the specified binary (P1). Windows: Supported macOS: Supported for application bundles Linux: Supported on built executables only |
{productVersion:P1} | 3.4 | Returns the product version of the specified binary (P1). Windows: Supported macOS: Supported for application bundles Linux: Supported on built executables only |
{companyName:P1} | 3.4 | Returns the company name of the specified binary (P1). Windows: Supported macOS: Supported on executables branded by Builder console only Linux: Supported on built executables only |
{copyright:P1} | 3.4 | Returns the copyright of the specified binary (P1). Windows: Supported macOS: Supported for application bundles Linux: Supported on built executables only |
{diskImage:P1} | 3.4 | Returns the disk image for the specified path (P1). Windows: Not supported macOS: Used to get the dmg path for an application run from an dmg Linux: Used to get the mount point for a path |
Graphics
| Name | DirectGVR Version | Description |
|---|---|---|
| {directXVersion} | 4.0 | Returns the highest installed version of DirectX. 11.1 |
| {openGLVersion} | 4.0 | Highest version of OpenGL installed. 2.1 |
Hardware
| Name | DirectGVR Version | Description |
|---|---|---|
| {cpuCount} | 4.0 | Number of CPUs. 2 |
| {cpuDescription} | 4.0 | System CPU description string. Windows: Genuine Intel I7 @ 3500mHz |
| {cpuVendor} | 4.0 | System CPU Vendor name. Windows: Intel |
| {systemMemory} | 4.0 | Amount of system memory, in bytes. 8589934592 |
| {videoCardType} | 4.0 | Description of video cards, comma-delimited. NVIDIA GT340,NVIDIA GT480 |
| {videoCardMemory} | 4.0 | Amount of video memory, in bytes, comma-delimited. 536870912,1048576 |
Hash/Encryption
| Name | DirectGVR Version | Description |
|---|---|---|
{hash:P1,P2} | 5.1.10 | Hash with algorithm (P1) and string (P2). Supported algorithms: crc, md5, sha1, sha256, sha384, sha512 |
{hmac:P1,P2,P3} | 5.1.10 | HMAC hash with algorithm (P1) and key (P2) of string (P3). Supported algorithms: md5, sha1, sha256, sha384, sha512 |
Math
| Name | DirectGVR Version | Description |
|---|---|---|
{math:P1,P2,P3} | 5.1.12 | Performs a math operation (P1) on two 64-bit integers (P2, P3). Supported operations are: add - Adds two values subtract - Subtracts two values mod - Mods two values multiply - Multiplies two values divide - Divides two values, returns 0 if NaN |
Module
| Name | DirectGVR Version | Description |
|---|---|---|
| {commandLine} | 5.1 | Command line arguments used for the current process. —arg1 —arg2 -debug |
{commandLine:P1} | 5.1 | Returns the command line argument P1’s value. —arg1=val1 |
| {moduleArchitecture} | 7.1 | App architecture. ARM: arm Intel/AMD: x86 |
| {moduleAppDirectory} | 5.1 | App directory for the current process. Same as {ModuleDirectory} on Windows. /users/x/program.app/ |
| {moduleAppPath} | 5.1 | App path for the current process. Same as {ModulePath} on Windows. /users/x/program.app |
| {moduleBitness} | 3.4 | App bitness, if the executable is 32-bit or 64-bit. 32-bit machine: 32 64-bit machine: 64 |
| {moduleDistribution} | 7.2.60 | Distribution name for the executable. Possible values: win32, winrt32, win64, winrt64, mac64, macarm64, lin64, xbox |
| {moduleDirectory} | 5.1 | Directory to the current process. *c:\test* |
| {moduleDllDirectory} | 5.1 | Directory for the current module inside the process otherwise the process module. *c:\testinterop* |
| {moduleDllPath} | 5.1 | Path of the current module inside the process otherwise the process module. c:\testinterop\interop.dll |
| {moduleElevated} | 5.1 | Elevated status for the current process. Elevated:1 Unelevated: 0 |
| {moduleFileName} | 5.1 | File name for the current process. program.exe |
| {moduleFileTitle} | 3.4 | File name title for the current process. program |
| {moduleLogDirectory} | 5.1.7 | Directory where the logs are stored by default. The location depends on whether or not the application has branding information associated with it, such as the company name or product name of the application module. If the application module has branding information: Windows: {UserAppData}\{CompanyName}\{ProductName}\ Windows (running as SYSTEM): {CommonAppData}\{CompanyName}\{ProductName}\ macOS (current binary): ~/Library/Logs/{ProductName}/ macOS (any binary): {UserAppData}/{CompanyName}/{ProductName}/ Linux: {UserAppData}\{CompanyName}\{ProductName}\ XBox: {ModuleDirectory} If the application module does not have branding information: Windows: {UserAppData}\{ModuleFileTitle}\ Windows (running as SYSTEM):{CommonAppData}\{ModuleFileTitle}\ macOS (current binary): ~/Library/Logs/{ModuleFileTitle}/ macOS (any binary): {ModuleDirectory} Linux: {UserAppData}\{ModuleFileTitle}\ XBox: {ModuleDirectory} |
| {modulePath} | 5.1 | Path for the current process. c:\test\program.exe |
Network
| Name | DirectGVR Version | Description |
|---|---|---|
| {intranetIP} | 3.4 | Intranet IP of the primary network adapter. 10.10.0.1 |
| {macAddress} | 3.4 | MAC Address for the primary network adapter. |
| {machineName} | 5.2.0.163 | Network computer name. |
Path/URL manipulation
| Name | DirectGVR Version | Description |
|---|---|---|
| {pathSlash} | 5.1 | Path separator for the system. Windows: \ macOS: / Linux: / |
{pathParse:P1,P2} | 5.1.12 | Parses a part (P1) of a path (P2). Supported values for part are: dir or directory - Gets the directory name or filename - Gets the filename with extension title or nameWithoutExtension or filenameWithoutExtension - Gets the filename without extension extension - Gets the file extension without dot extensionWithDot - Gets the file extension with the dot |
{pathFix:P1,P2} | 5.1.7 | Fixes up a path string (P1) and also ensures or removes a trailing slash (P2). Second parameter is an optional boolean value indicating whether or not to remove (false) the last slash or to ensure that the path ends with a slash (true). The default value is true. |
{pathJoin:P1,P2} | 5.1.7 | Combines two paths (P1 and P2). |
{pathToUrl:P1} | 5.1 | Converts a file path to a URL c:\windows\system32\notepad.exe → file:///c/windows/system32/notepad.exe |
{pathFromUrl:P1} | 5.1.12 | Converts a URL to a path file:///c/windows/system32/notepad.exe → c:\windows\system32\notepad.exe |
{urlParse:P1,P2} | 5.1.12 | Parses a part (P1) of a URL (P2). Supported values for part are: protocol - Gets the protocol/scheme username - Gets the username if supplied password - Get the password if supplied domain - Get the domain (host excluding subdomain) host - Gets the full hostname hostWithoutPort - Gets the host minus any port if explicitly stated path - Gets the directory and filename pathWithQuery - Gets the path with the query string pathWithoutFilename - Gets the directory filename - Gets the filename query - Gets the query string include question mark query=name - Gets the value of a query string parameter specified by name queryWithFragment - Gets the query string including the fragment fragment - Gets the fragment string including pound sign port - Get the port number, tries to determine if not explicitly stated urlWithoutQuery - Removes only the query string from the url urlWithoutFragment - Removes only the fragment from the url urlWithoutFilename - Removes only the filename from the url |
{urlEncode:P1} | 6.0.1 | URL encodes a string Everything is percent-encoded except for: @*-_./:\ Aa-Zz 0-9 |
{urlQueryEncode:P1} | 6.1.0.60 | URL encode a query param Everything is percent-encoded except for: -_.~ Aa-Zz 0-9 |
{base64UrlEncode:P1} | 6.0.1 | Base64 URL encodes a string |
{urlDecode:P1} | 6.0.1 | URL decodes a string |
{base64UrlDecode:P1} | 6.0.1 | Base64 URL decodes a string |
{urlFix:P1} | 5.1.12 | Fixes up a url (P1) and ensures that path slashes are forward slash, that it does not contain double slashes, and that spaces are converted to %20. |
{urlJoin:P1,P2} | 5.1.12 | Combines a base URL (P1) and a partial URL (P2) |
Registry
| Name | DirectGVR Version | Description |
|---|---|---|
{registry:P1,P2,P3} | 3.4 | Returns a registry key in the view (P1) of the hive (P2) at the path including the key (P3). Windows: Uses system registry macOS: Uses CFPreferences for the current application Linux: Uses dconf |
String/Encoding
| Name | DirectGVR Version | Description |
|---|---|---|
{copy:P1} | 3.1 | Copies the string (P1). |
{substring:P1,P2,P3} | 5.1.12 | Copies a substring from index (P1) to index (P2) from the string (P3). Also known as SubCopy in 3.6+. |
{replace:P1,P2,P3} | 3.5 | Replaces a string (P1) with another string (P2) in the string (P3). |
{versionCompare:P1,P2,P3} | 3.5 | Compares using a equality operator (P2) two version numbers (P1 & P3), resulting in “1” if the condition is true otherwise “0”. |
{toBase64:P1} | 3.4 | Encodes to base64 encoded string (P1). |
{fromBase64:P1} | 3.4 | Decodes from base64 encoded string (P1). |
{fromHex:P1} | 3.4 | Decode from hex encoded string (P1). |
{toHex:P1} | 3.4 | Encodes to base64 encoded string (P1). |
{base64ToHex:P1} | 5.1.12 | Safely converts a base64 encoded string (P1) to hex encoded string. |
{hexToBase64:P1} | 5.1.12 | Safely converts a hex encoded string (P1) to a base64 encoded string. |
{int32ToHex:P1} | 3.4 | Converts 32-bit integer (P1) to a hex string. |
{int64ToHex:P1} | 3.4 | Converts 64-bit integer (P1) to a hex string. |
{int64Compare:P1,P2,P3} | 3.5 | Compares using a equality operator (P2) two 64-bit integers (P1 & P3), resulting in “1” if the condition is true otherwise “0”. |
{uInt32ToHex:P1} | 3.4 | Converts unsigned 32-bit integer (P1) to a hex string. |
{uInt64ToHex:P1} | 3.4 | Converts unsigned 64-bit integer (P1) to a hex string. |
{uInt64Compare:P1,P2,P3} | 3.4 | Compares using a equality operator (P2) two unsigned 64-bit integers (P1 & P3), resulting in “1” if the condition is true otherwise “0”. |
{limit:P1,P2} | 3.1 | Truncates a string (P2) by certain number of characters (P1). |
{trim:P1,P2} | 3.1 | Trims characters (P1) from the beginning and end of a string (P2). If P1 is not supplied, then the string will be trimmed of all whitespace characters from both ends of the string. |
{upper:P1} | 3.1 | Converts string (P1) to all uppercase characters. |
{lower:P1} | 3.1 | Converts string (P1) to all lowercase characters. |
{capitalize:P1} | 5.1.8 | Changes the first character in the string (P1) to uppercase. |
{uncapitalize:P1} | 5.1.8 | Changes the first character in the string (P1) to lowercase. |
{if:P1,P2,P3} | 3.5 | If condition (P1) is equal to “1” then P2 otherwise P3. |
{indexOf:P1,P2} | 3.5 | Index of needle (P1) in haystack (P2). |
{lastIndexOf:P1,P2} | 5.1.12 | Last index of needle (P1) in haystack (P2). |
{equals:P1,P2} | 3.5 | Compares two strings (P1 & P2) for equality resulting in “1” if equal, “0” if not. |
| {guid} | 3.4 | A newly created GUID string. |
| {random} | 3.4 | A random 120 character string. |
| {this} | 3.1 | The string so far that has been expanded, ending at the first unexpanded macro. abc{Copy:defg}{This} expands to abcdefgabcdefg |
System info
| Name | DirectGVR Version | Description |
|---|---|---|
| {systemShortName} | 3.3 | The short name of the system. Windows: win macOS: mac Linux: linux |
| {systemName} | 3.2 | The name of the system. Windows: Windows NT macOS: Intel Mac OS X Linux: x86_64 Linux (varies) |
| {systemVersion} | 3.2 | Version of the system. |
| {systemBitness} | 3.4 | System bitness 32bit or 64bit. |
| {userName} | 3.4 | System user name. |
| {userISO639LangName} | 3.2 | ISO639 language name. US English: en |
| {userISO3166CountryName} | 3.2 | ISO3166 country name. US English: US |
{diskSpace:P1} | 4.0 | Space remaining at local path (P1). 123212211 |
System paths
| Name | DirectGVR Version | Description |
|---|---|---|
| {systemDirectory} | 5.1 | System path. Windows XP or higher: C:\WINDOWS\system32\ macOS: /System/ Linux: / |
| {systemDirectory64} | 7.2.79 | 64-bit system path. Windows 32-bit: C:\WINDOWS\system32\ Windows 64-bit: C:\WINDOWS\SysWOW64\ macOS: /System/ Linux: / |
| {systemDrive} | 5.1.6 | System drive. Windows: C:\ macOS: / Linux: / |
| {workingDirectory} | 5.2 | Current working directory. |
| {temp} | 5.1 | Temporary directory. Windows Vista or higher: C:\Users\{userName}\AppData\Local\Temp\ Windows XP: C:\DOCUME |
| {adminTemp} | 5.1 | Temporary directory for the user that has admin privileges. Windows: C:\Windows\Temp\ macOS: /var/run/ Linux: /var/run/ {temp} typically has limited privileges and {commonAppData} can be modified by other users on the machine |
| {programFiles} | 3.1 | Path to the program files directory. Windows Vista or higher: C:\Program Files (x86)\ Windows XP: C:\Program Files\ macOS: /Applications/ Linux: /opt/ |
| {programFiles32} | 7.2.31 | Path to the program files 32-bit directory. Windows XP or higher: C:\Program Files (x86)\ macOS: /Applications/ Linux: /opt/ |
| {programFiles64} | 5.1 | Path to the program files 64-bit directory. Windows XP or higher: C:\Program Files\ macOS: /Applications/ Linux: /opt/ |
| {userStartMenu} | 5.1 | Path to the user’s start menu directory. Windows Vista or higher: C:\Users\{userName}\AppData\Roaming\Microsoft\Windows\Start Menu\ Windows XP: C:\Documents and Settings\{userName}\Start Menu\ macOS: /Applications/ Linux: ~/.local/share/applications/ |
| {commonStartMenu} | 5.1.6 | Path to the common start menu directory for all users. Windows Vista or higher: C:\ProgramData\Microsoft\Windows\Start Menu\ Windows XP: C:\Documents and Settings\All Users\Start Menu\ macOS: /Applications/ Linux: ~/.local/share/applications/ |
| {userConfig} | 8.0.67 | Path to the user’s configuration data directory. Windows Vista or higher: C:\Users\{userName}\AppData\Local\ Windows XP: C:\Documents and Settings\{userName}\Local Settings\Application Data\ macOS: ~/Library/Application Support/ Linux: ~/.config/ |
| {userHome} | 3.4 | Path to the user’s home directory. Windows Vista or higher: C:\Users\{userName}\ Windows XP: C:\Documents and Settings\{userName}\ macOS: /Users/{userName}/ Linux: /home/{userName}/ |
| {userDocuments} | 3.1 | Path to the user’s documents folder. Windows Vista or higher: C:\Users\{userName}\Documents\ Windows XP: C:\Documents and Settings\{userName}\My Documents\ macOS: /Users/{userName}/Documents/ Linux: /home/{userName}/Documents/ |
| {userDesktop} | 3.1 | Path to the user’s desktop folder. Windows Vista or higher: C:\Users\{userName}\Desktop\ Windows XP: C:\Documents and Settings\{userName}\Desktop\ macOS: /Users/{userName}/Desktop/ Linux: /home/{userName}/Desktop/ |
| {commonDesktop} | 5.1.6 | Path to the common desktop folder for all users. Windows Vista or higher: C:\Users\Public\Desktop\ Windows XP: C:\Documents and Settings\All Users\Desktop\ macOS: /Users/{userName}/Desktop/ Linux: /home/{userName}/Desktop/ |
| {userDownloads} | 3.5.4 | Path to the user’s download directory. Windows Vista or higher: C:\Users\{userName}\Downloads\ Windows XP: C:\Documents and Settings\{userName}\My Documents\ (Note: XP does not have a system defined download area) macOS: /Users/{userName}/Downloads/ Linux: /home/{userName}/Downloads/ |
| {userAppData} | 3.1 | Path to the user’s appdata directory. Windows Vista or higher: C:\Users\{userName}\AppData\Local\ Windows XP: C:\Documents and Settings\{userName}\Local Settings\Application Data\ macOS: ~/Library/Application Support/ Linux: ~/.local/share/ |
| {userAppDataLow} | 6.1.2.69 | Path to the user’s app data local low directory. Windows Vista or higher: C:\Users\{userName}\AppData\LocalLow\ Windows XP: C:\Documents and Settings\{userName}\Application Data\ macOS: ~/Library/Application Support/ Linux: ~/.local/share/ |
| {userAppDataRoaming} | 3.1 | Path to the user’s app data roaming directory. Windows Vista or higher: C:\Users\{userName}\AppData\Roaming\ Windows XP: C:\Documents and Settings\{userName}\Application Data\ macOS: ~/Library/Application Support/ Linux: ~/.local/share/ |
| {commonAppData} | 3.1 | Path to the common app data directory for all users. Windows Vista or higher: C:\ProgramData\ Windows XP: C:\Documents and Settings\All Users\Application Data\ macOS: /Users/Shared/ Linux: /usr/share/ |
| {toolSuffix} | 5.1 | File extension for tool binaries on the current platform. Windows: .exe macOS: Linux: |
| {bundleSuffix} | 6.1 | File extension for application bundle on the current platform. Windows: macOS: .app Linux: |
| {libraryPrefix} | 5.1 | File name prefix for dynamically linked libraries on the current platform. Windows: macOS: lib Linux: lib |
| {libraryExtension} | 5.1 | File extension for dynamically linked libraries on the current platform. Windows: dll macOS: dylib Linux: so |
Time
| Name | DirectGVR Version | Description |
|---|---|---|
| {time} | 3.1 | Unix timestamp in seconds. |
| {time60} | 3.1 | Unix timestamp in seconds to the last minute. |
{timeStamp:P1} | 3.1 | Timestamp in YYYYMMDDHHmmSS given a unix timestamp (P1). |
Unknown name*
| Name | DirectGVR Version | Description |
|---|---|---|
| {unknown||} | 7.2 | Empty if the name is unknown*. |
{unknown||P1} | 7.2 | Value in P1 if the name is unknown*. |
- Any name not listed in the sections above and not a user defined macro.

