nnCron Predefined Variables
||current hour (00-23)|
|%mm%||current minute (00-59)|
current second (00-59).
|%DD%||day of a month (01-31)|
|%WW%||day of a week (Mo-Su)|
|%WD%||day of a week (1-7, where 1 is Monday, and 7 is Sunday)|
|%YYYY%||year (4 digit)|
|%YY%||year (last 2 digit)|
|%crlf%||carriage return followed by line feed|
|%QUOTE%||quotation mark (")|
|%%||percent sign (%)|
|%PERCENT%||percent sign (%)|
inserts the contents of a file filename.
name of a found file (see FOR-FILES:)
|%FOUND-FULLPATH%||full path and name of a found file (see FOR-FILES:)|
|%FOUND-RELPATH%||path and name of a found file relative to the directory where search is performed (see FOR-FILES:)|
|%WIN-TITLE%||window title (see "Working with Application Windows")|
title of the active window (see "Working with Application Windows")
|%FOUND-WINDOW%||title of a found window (see "Working with Application Windows")|
|%FOUND-CHILD-WINDOW%||title of a found child window (see FOR-CHILD-WINDOWS:)|
|%FOUND-PROC%||the name of the found process (see "Working with processes")|
|the PID of the found process (see "Working with processes")|
|%[if] <condition>% ... %[else]% ... %[end]%||- the easy way to change your string depending on given condition|
||- inserting the n-th value from the stack|
|- inserting the string from the stack. The starting address of the string should be the n-th value on the stack and the counter should be the n-th value on the stack minus one (n-1)|
Note: the stack numbering starts with zero (0), so the value on top of the stack is always the value 0. After %n esPICK% and %n esPICKS% usage the stack is cleared up to the n-th value plus 1 (n+1) , so the n-th value plus 1 (n+1) becomes the topmost value on the stack.
|%COMSPEC%||name or the command interpreter (command.com in Win9* and cmd.exe in WinNT/2000/XP)|
|%CLIPBOARD%||current contents of the Windows clipboard|
name of the current logged in user
|%CONNECTION%||a list of all active remote connections (conn1, conn2, ...)|
|%LAST-CONNECTION%||name of the last remote connection (e.g. for WatchDisconnect)|
|%ModuleDirName%||the full path to the directory, where nnCron is installed|
|%CHAR X FREE-SPACE%||
amount of free space on disk X: (in kilobytes).
For example, for C: drive it will be %CHAR C FREE-SPACE%, for D: drive%CHAR D FREE-SPACE% etc.
|%$0% %$1% .... %$15%||variables used in regular expressions|
|%ExitCodeProc%||exit code (error level) of an application. Used after execution of START-APPW:|
|%ThreadId%||number of a thread in which a task is started, task process identifier|
|%WATCH-PROC-ID%||contains process identifier (PID). This variable is filled after words WatchProc:/WatchProcStop: have been used. It is used as an argument for words used to handle processes.|
|%WATCH-SESSIONID%||contains the SessionID.This variable is filled after WTSWatch* words have been used.|
|%DRIVE-LETTER%||contains the inserted/removed removable data storage device letter. This variable is filled after words WatchDrive:/WatchDriveRemove: have been used.|
contains a unique string which is built in this way: <running number >.<ThreadId>.<TickCounter>, e.g.:
Such a string maybe conveniently used, for example, as a unique file name.
|contains the previous %TempFile%|
|PROC-ID||process identifier (PID) of an application started by nnCron. It is used as an argument for words handling processes. This variable is filled after each time an applications is started successfully (see START-APP:, START-APPW:, QSTART-APP:).|
|WIN-HWND||contains window handle of a window. It is filled after most of command having to do with windows (and WIN-EXIST: as well).|
|WIN-CHILD-HWND||contains window handle of a child window. This variable is filled inside of the FOR-CHILD-WINDOWS: loop.|
Special folders (variables which return path and name of user folders will contain empty strings unless a user profile is loaded):
|%FOLDER-APP-DATA%||Application data folder|
|%FOLDER-COMMON-DESKTOP%||Common desktop for all users|
|%FOLDER-COMMON-STARTMENU%||Common Start menu|
|%FOLDER-COMMON-PROGRAMS%||Common Programs menu|
|%FOLDER-RECENT%||Documents menu (within Start menu)|
|%FOLDER-SENDTO%||"Send to" menu|
|%FOLDER-TEMP%||Temp folder (for temporary files)|
Besides, any environment variables, e.g. %PATH%, and any Forth words can also be used as nnCron variables, but in this case an expression must return a string ( addr u) or a 32-bit integer ( n).
\ the number of milliseconds since system startup, \ will be inserted to a string MSG: "%GetTickCount%"