Download::Order WireKeys    Plugins    Macros    Sources    Tips&Tricks    Help   

Patterns



For your convenience all application strings such as screenshot signatures or file names or parts of the macro script can be formed automatically using patterns. Pattern - predefined string beginning with char '%', for example '%CLIP'. Patterns will be substituted with the actual value at the run time. Note: Patterns are case sensitive
Available at this time patterns are:

1. Common patterns (available everywhere):
- '%DATE': Current date
- '%TIME': Current time
- '%YEAR': Current year
- '%MONTH': Current month
- '%DAY': Current day
- '%HOUR': Current hour
- '%MINUTE': Current minute
- '%SECOND': Current second
- '%CLIP': text from clipboard
All environment strings in the form '%VariableName%' supported too. For example, you can use '%USERNAME%' to insert active user name

1.1. Common input patterns:
- '%ASKFILE': Ask user for file (shows "Open file" dialog)
- '%ASKFOLDER': Ask user for folder (shows "Browse for folder" dialog)

1.2. Common patterns that can be used for run-time detection of the foreground application:
- '%ACTIVEAPP': Name of the active application
- '%ACTIVEWND': Title of the active window
- '%ACTIVEEXE': Full path to the active application
- '%ISRUN:xxx': '1' if application 'xxx' is currently active (even as background process) or '0' if no active application with process name like 'xxx' found

2. Specific to screenshot signature and screenshot file name
- '%TITLE': Title of the active application
- '%COUNT': Sequential screenshot number since WireKeys start time

3. Specific to Quick run/Macro parameter and macro script file content:
- '%SELECTED': Currently selected line of text (or first line of multiline text)
- '%ESCAPED': Currently selected multiline text, escaped with %-coding (for JScript macros) in the '%uXXXX' from
- '%URL_SELECTED': Currently selected multiline text, escaped with %-coding (for JScript macros) in the '%XX' from
- '%PARAMETER': Parameter of the currently working macro, escaped with %-coding (always escaped)
- '%COOKIE:...%': Cookie value, previously defined by any script
If you have select file or folder in any file explorer, %SELECTED/%ESCAPED will contain full path to that file. In this case you can use two additional patterns:
- '%SELECTED_FOLDER': Folder of the selected file
- '%SELECTED_FILE': File name with extension of the selected file


Most patterns can be inserted in escaped form (characters are replaced with hex codes prefaced with '%' symbol). To insert pattern in escaped form just prepend its name with "E_", for example '%ACTIVEAPP'->'%E_ACTIVEAPP'.
This is useful for giving text parameter to web resource through URL, for example. Patterns that can be used in escaped form: '%E_SELECTED','%E_CLIP','%E_ASKFILE','%E_ASKFOLDER','%E_ACTIVEAPP', '%E_ACTIVEWND','%E_ACTIVEEXE'
Time format characters
Picture Meaning
h Hours with no leading zero for single-digit hours; 12-hour clock.
hh Hours with leading zero for single-digit hours; 12-hour clock.
H Hours with no leading zero for single-digit hours; 24-hour clock.
HH Hours with leading zero for single-digit hours; 24-hour clock.
m Minutes with no leading zero for single-digit minutes.
mm Minutes with leading zero for single-digit minutes.
s Seconds with no leading zero for single-digit seconds.
ss Seconds with leading zero for single-digit seconds.
t One character time-marker string, such as A or P.
tt Multicharacter time-marker string, such as AM or PM.

Date format characters
Picture Meaning
d Day of month as digits with no leading zero for single-digit days.
dd Day of month as digits with leading zero for single-digit days.
ddd Day of week as a three-letter abbreviation.
dddd Day of week as its full name.
M Month as digits with no leading zero for single-digit months.
MM Month as digits with leading zero for single-digit months.
MMM Month as a three-letter abbreviation.
MMMM Month as its full name.
y Year as last two digits, but with no leading zero for years less than 10.
yy Year as last two digits, but with leading zero for years less than 10.
yyyy Year represented by full four digits.
gg Period/era string.

Burris denied seat in US Senate to succeed Obama (AP)
Economic crisis, Obama response face new Congress (AP)
Israel shells near UN school, killing at least 30 (AP)
Obama says trillion-dollar deficits may last years (AP)