The Hot Codes

You can insert a special command called hot code to a text shortcut telling Asutype to act dependently on circumstances at runtime, such as inserting date and time information, formatting text etc. Hot codes make text shortcuts more powerful and flexible, and you are encouraged to use them as much as possible.

  • A hot code is always enclosed in <> tag pair such as <BACK>, <TIME:%#m/%#d/%y>, <HERE> etc.
  • You can either type a hot code into your shortcut or choose a hot code from the "Hot Code" button in the Shortcut Lists editor.

Asutype supports the following hot codes:

Special Character Codes

Code Action Example
<LESSTHAN>
<LT>
Insert character <  
<GREATERTHAN>
<GT>
Insert character >  
<CHARACTER:decimal>
<CHAR:decimal>
Insert a character with the decimal value <CHAR:169> will insert ©
<CHARACTER:#hexa>
<CHAR:#hexa>
Insert a character with the hexa-decimal value <CHAR:#A9> will insert ©

Simple Key Codes

You can indicate a repeat count for each key (the italic [] denotes optional information). To form a key combination, use + such as <CTRL+B>, <ALT+F4> etc.

Code Action Example
<LEFTSHIFT>
<LSHIFT>
Press and release the left SHIFT key  
<RIGHTSHIFT>
<RSHIFT>
Press and release the right SHIFT key  
<SHIFT> Press and release a SHIFT key (left or right; the exact key depends on your Windows setting)  
<LEFTCONTROL>
<LEFTCTRL>
<LCONTROL>
<LCTRL>
Press and release the left CONTROL key  
<RIGHTCONTROL>
<RIGHTCTRL>
<RCONTROL>
<RCTRL>
Press and release the right CONTROL key  
<CONTROL>
<CTRL>
Press and release the a CONTROL key (left or right; the exact key depends on your Windows setting)  
<LEFTALT>
<LALT>
Press and release the left ALT key  
<RIGHTALT>
<RALT>
Press and release the right ALT key  
<ALT> Press and release the an ALT key (left or right; the exact key depends on your Windows setting)  
<LEFTWIN>
<LWIN>
Press and release the left WIN key  
<RIGHTWIN>
<RWIN>
Press and release the right WIN key  
<WIN> Press and release the a WIN key (left or right; the exact key depends on your Windows setting)  
<BACKSPACE[:count]>
<BACK[:count]>
<BS[:count]>
Press and release the BACKSPACE key count times (or once if the count is omitted) <BACK:6> will backspace 6 positions
<RETURN[:count]>
<ENTER[:count]>
Press and release the ENTER key count times (or once if the count is omitted) <ENTER:6> will press the ENTER key once
<TAB[:count]> Press and release the TAB key count times (or once if the count is omitted)  
<ESCAPE[:count]>
<ESC[:count]>
Press and release the ESCAPE key count times (or once if the count is omitted)  
<SPACE[:count]> Press and release the SPACE key count times (or once if the count is omitted) <SPACE:2> will press the SPACE key twice
<PAGEUP[:count]>
<PGUP[:count]>
<PRIOR[:count]>
Press and release the PAGEUP key count times (or once if the count is omitted)  
<PAGEDOWN[:count]>
<PGDN[:count]>
<NEXT[:count]>
Press and release the PAGEDOWN key count times (or once if the count is omitted)  
<HOME[:count]> Press and release the HOME key count times (or once if the count is omitted)  
<END[:count]> Press and release the END key count times (or once if the count is omitted)  
<LEFT[:count]> Press and release the LEFT arrow key count times (or once if the count is omitted)  
<RIGHT[:count]> Press and release the RIGHT arrow key count times (or once if the count is omitted)  
<UP[:count]> Press and release the UP arrow key count times (or once if the count is omitted)  
<DOWN[:count]> Press and release the DOWN arrow key count times (or once if the count is omitted)  
<INSERT[:count]>
<INS[:count]>
Press and release the INSERT key count times (or once if the count is omitted)  
<DELETE[:count]>
<DEL[:count]>
Press and release the DELETE key count times (or once if the count is omitted)  
<F1[:count]>
<F2[:count]>
<F3[:count]>
<F4[:count]>
<F5[:count]>
<F6[:count]>
<F7[:count]>
<F8[:count]>
<F9[:count]>
<F10[:count]>
<F11[:count]>
<F12[:count]>
Press and release the function Fx key count times (or once if the count is omitted)  

Special Key Combinations

Code Action Example
<HOLDSHIFT>normal-keys-or-text</HOLDSHIFT> Type the keys or text while holding the SHIFT <HOLDSHIFT><LEFT:6></HOLDSHIFT> will select 6 characters from the current caret position in most text editors
<HOLDCONTROL>normal-keys-or-text</HOLDCONTROL> Type the keys or text while holding the CONTROL  
<HOLDALT>normal-keys-or-text</HOLDALT> Type the keys or text while holding the ALT  

Date/Time Codes

Code Action Example
<TIME:format> Insert the current time If today is April 10, 2001 then <TIME:%#m/%#d/%y> with insert 04/10/01
<TIME+(hours :minutes :seconds):format> Insert the time ahead of the current time by the amount in the parentheses <TIME+(24:0:0):%#d> will insert the date of tomorrow
<TIME-(hours :minutes :seconds):format> Insert the time past of the current time by the amount in the parentheses <TIME-(24:0:0):%#d> will insert the date of yesterday

Time Format
The time format consists of one or more characters. Characters preceded by a percent sign % bear a special meaning:

Characters Meaning Example
&a Abbreviated weekday name  
&A Full weekday name  
&b Abbreviated month name  
&B Full month name  
&c Date and time representation appropriate for the current Windows setting  
&d Day of month as decimal number (01 - 31)  
&H Hour in 24-hour format (00 - 23)  
&l Hour in 12-hour format (01 - 12)  
&j Day of year as decimal number (001 - 366)  
&m Month as decimal number (01 - 12)  
&M Minute as decimal number (00 - 59)  
&p A.M./P.M. indicator for 12-hour clock  
&S Second as decimal number (00 - 59)  
&U Week of year as decimal number, with Sunday as first day of week (00 - 53)  
&w Weekday as decimal number (0 - 6; Sunday is 0)  
&W Week of year as decimal number, with Monday as first day of week (00 - 53)  
&y Year without century, as decimal number (00 - 99)  
&Y Year with century, as decimal number  
&& Percent sign (&)  

Characters that do not begin with & are left unchanged. You can also use the # flag to prefix any formatting code. In that case, the meaning of the format code is changed as follows.

&#a, &#A, &#b, &#B, &#p, &#X, &#z, &#Z, &#&
# flag is ignored.

&#c
Long date and time representation. For example: "Tuesday, March 14, 1995, 12:41:29".

&#x
Long date representation. For example: "Tuesday, March 14, 1995".

&#d, &#H, &#I, &#j, &#m, &#M, &#S, &#U, &#w, &#W, &#y, &#Y
Remove leading zeros (if any).

Action Codes

Code Action Example
<HERE> Place the caret to this position after expanding the text www.<HERE>.com will be expanded to www..com and the caret will be placed between the two dots
<COPY> Copy the current selection into the clipboard  
<COPY:file-name> Copy the current selection into the clipboard and save it to a file-name file <COPY:myaddress.txt> will copy the current selection to a file named "myaddress.txt" in the Asutype's data folder
<PASTE> Paste the clipboard out to your document  
<PASTE-> Trim the clipboard (e.g. remove all beginning and ending blank characters -- white spaces, tabs, soft- and hard-returns) and paste it out to your document  
<PASTE:file-name> Place the content of the file file-name into the clipboard and paste it out to your document <PASTE:myaddress.txt> will paste the content of the file "myaddress.txt" to the current caret position
<PASTE-:file-name> Trim the content of the file file-name, copy it into the clipboard and paste it out to your document  
<ASK[:variable-name]> Ask for a text at run-time Dear Mr. <ASK>, will ask you to enter a name and then type Dear Mr. Name,
<MESSAGE:text>
<MSG:text>
Display a message  
<FLASH> Flash the screen <COPY><FLASH> will flash screen when the text is copied into the clipboard

Advanced Codes

Code Action Example
<LET:variable-name> Define a variable once and reuse it several times later in the shortcut See more information in the Variable section below
<IF:(logical-expression)>normal text or other hot codes</IF> Apply the block of text or hot codes if the condition in the <IF> is true See more information in the Logical Expressions section below
<APPLY:executable-file-names>normal text or other hot codes</APPLY> Apply the block of text or hot codes for applications which executable file name is listed in the executable-file-names. File names are separated by | <APPLY:notepad.exe><CTRL+O> will apply this shortcut in NotePad only. The shortcut will not have any effect in other applications
<APPLY-:executable-file-names>normal text or other hot codes</APPLY> Apply the block of text or hot codes for applications which executable file name is not listed in the executable-file-names. File names are separated by | <APPLY-:notepad.exe><CTRL+O> will apply this shortcut in all applications except NotePad.
<WINAPPLY:window-titles>normal text or other hot codes</WINAPPLY> Apply the block of text or hot codes for windows which title is listed in the window-titles. Titles are separated by |  
<WINAPPLY-:window-titles>normal text or other hot codes</WINAPPLY> Apply the block of text or hot codes for windows which title is not listed in the window-titles. Titles are separated by |  
<KBDAPPLY:language-names>normal text or other hot codes</KBDAPPLY> Apply the block of text or hot codes if the current language in use is listed in the language-names. Names are separated by | <KBDAPPLY:FR><LOAD:french.spelling></KBDAPPLY><KBDAPPLY-:FR><UNLOAD:french.spelling<</KBDAPPLY>.

This code will load the French.spelling dictionary to work if the current language is French and unload it if the language changes to something else.
<KBDAPPLY-:language-names>normal text or other hot codes</KBDAPPLY> Apply the block of text or hot codes if the current language in not use is listed in the language-names. Names are separated by |  
<OPEN:executable-file-name> Launch the application which executable file name is executable-file-name <OPEN:notepad.exe> will launch NotePad
<ACTIVATE:title|executable-file-name>
<SWITCH:title|executable-file-name>
Activate the window with the title title. If there is no such a window found then launch the application which executable file name is executable-file-name <ACTIVATE:NotePad|notepad.exe> will bring the current NotePad window up front. If NotePad is not running, launch NotePad
<INCLUDE:file-name>
<INC:file-name>
Insert the content of the file file-name into the current shortcut  
<REFERENCE:shortcut-name><
REF:shortcut-name>
Insert the content of the shortcut shortcut-name into the current shortcut  
<DELAY:number-of-milliseconds> Stop the typing for a short period of milliseconds <DELAY:500> will delay the typing for half a second
<LIFTKEYS> Lift all Control, Shift and Alt keys up  
<LBUTTON[:x,y]> To click the left mouse button at a specific position <LBUTTON> will left click the mouse at its current position
<LBUTTON:100,50> will left click the mouse at the position (100, 50) relative to the upper left corner of the screen.
<RBUTTON[:x,y]> To click the right mouse button at a specific position <RBUTTON> will right click the mouse at its current position
<RBUTTON:100,50> will right click the mouse at the position (100, 50) relative to the upper left corner of the screen.
<LDRAG:x1,y1|x2,y2> Drag the LEFT mouse button from the (x1, y1) point to the (x2, y2) point. The positions are relative to the upper left corner of the whole screen <LDRAG:|100,50> will drag the left mouse button from the current position to position (100, 50). <LDRAG:200,300|3200,300> will drag the left mouse button from the position (200,300) to position (3200,300).
<RDRAG:x1,y1|x2,y2> Drag the RIGHT mouse button from the (x1, y1) point to the (x2, y2) point. The positions are relative to the upper left corner of the whole screen  
<CHOOSE:choice1|choice2|choice3...> To ask you to choose one choice between several pre-defined choices to type at runtime. The choices are separated by | <CHOOSE:CHOOSE:ie|firefox|chrome> will ask you to choose between "ie", "firefox" and "chrome"
<LOAD:data-files> Load one or more data files (e.g. spelling dictionary, correction list or shortcut list) into work. The files are separated by | <LOAD:french.spelling> will load the french.spelling dictionary to work
<UNLOAD:data-files> Unload one or more data files (e.g. spelling dictionary, correction list or shortcut list) from the system. The files are separated by | <UNLOAD:french.spelling> will unload the french.spelling dictionary from the system
<SETTING:one-or-more attribute=value pairs> Change the setting for an attribute of the software. Multiple settings are separated by | <SETTING:Beep=0> will turn off the beeping sound

Asutype Settings

You can change the following settings in the <SETTING> hot code shortcuts:

Attribute Value Comment
UseEscape 0 or 1. Default is 1 Whether or not pressing the Escape key will dismiss the suggestion popup window? 1 means Yes and 0 means No.
UseShiftShift 0 or 1. Default is 0 Whether or not the Application Toggle hotkey Left-Shift+Right-Shift will be used? 1 means Yes and 0 means No.
UseCtrlCtrl 0 or 1. Default is 0 Whether or not the Selective Toggle hotkey Left-Control+Right-Control will be used? 1 means Yes and 0 means No.
UseCapslockTwice 0 or 1. Default is 1 Whether or not the Undo hotkey Capslock Twice will be used? 1 means Yes and 0 means No.
AutoFriend 0 or 1. Default is 1 Whether or not the application list in the Application Options is exclusive or inclusive? 1 means Exclusive and 0 means Inclusive.
CtrlCCtrlV 0 or 1. Default is 1 Whether or not to use Ctrl+C/Ctrl+V hotkeys to copy and paste text to and from the clipboard? 1 means Yes and 0 means No.
AutoPaste 0 or 1. Default is 1 Whether or not to use the clipboard to paste long text instead of typing it letter-by-letter? 1 means Yes and 0 means No.
PasteMin Any number. Default is 40. If the AutoPaste is 1 and the text to type has no less than this number of characters, Asutype will use the clipboard to paste the text instead of typing it. Pasting is often faster than letter-by-letter typing.
SmartCaret 0 or 1. Default is 1 Whether or not to use Asutype's own way to detect the current caret position? 1 means Yes and 0 means No.
EnterPopup 0 or 1. Default is 0 Whether or not to popup the suggestion window for mistakes that followed immediately with an Enter key. 1 means Yes and 0 means No.
UseGesture 0 or 1. Default is 0 Whether or not to use mouse gesture to trigger shortcuts? 1 means Yes and 0 means No.
IgnoreCertainChars 0 or 1. Default is 1. Whether or not to ignore words containing certain characters listed in the Options dialog box from spell checking?
1 means Yes and 0 means No.
IgnoreUndoneWords 0 or 1. Default is 1. Whether or not to ignore undone words from further spell checking?
1 means Yes and 0 means No.
IgnoreCapitalWords 0 or 1. Default is 0. Whether or not to ignore Capital words from spell checking?
1 means Yes and 0 means No.
IgnoreAllCapsWords 0 or 1. Default is 1. Whether or not to ignore ALL CAPS words from spell checking?
1 means Yes and 0 means No.
IgnoreMixedCaseWords 0 or 1. Default is 1. Whether or not to ignore MiXeD CaSe words from spell checking?
1 means Yes and 0 means No.
IgnoreCaseSensitivity 0 or 1. Default is 1. Whether or not to be case sensitive when checking the spelling?
1 means Yes and 0 means No.
IgnoreCertainPrefixes 0 or 1. Default is 0. Whether or not to ignore words having certain prefixes listed in the Options dialog box from spell checking?
1 means Yes and 0 means No.
IgnoreCertainPostfixes 0 or 1. Default is 0. Whether or not to ignore words having certain postfixes listed in the Options dialog box from spell checking?
1 means Yes and 0 means No.
Beep 0 or 1. Default is 1. Whether or not to beep on mistakes?
1 means Yes and 0 means No.
Highlight 0 or 1. Default is 1. Whether or not to highlight mistakes?
1 means Yes and 0 means No.
LogMistake 0 or 1. Default is 1. Whether or not to log mistakes out for later review?
1 means Yes and 0 means No.
DayHistory Any number. Default is 90. How many days the logged mistakes are relevant to correction learning? Asutype uses your past mistake and correction patterns to adapt to your typing.
PromptReview 0 or 1. Default is 1. Whether or not to prompt you to review mistake when exiting Asutype?
1 means Yes and 0 means No.
2Initial 0 or 1. Default is 0. Whether or not to correct for TWo INitial mistakes?
1 means Yes and 0 means No.
1stLetter 0 or 1. Default is 0. Whether or not to Capitalize first letter of sentences automatically?
1 means Yes and 0 means No.
Capslock 0 or 1. Default is 1. Whether or not to correct misuse of Capslock key?
1 means Yes and 0 means No.
CaseFix 0 or 1. Default is 1. Whether or not to fix case of words according to its form in the dictionaries?
1 means Yes and 0 means No.
RecogCorrect 0 or 1. Default is 1. Whether or not to correct recognized mistakes?
1 means Yes and 0 means No.
UnrecogCorrect 0 or 1. Default is 1. Whether or not to correct unrecognized mistakes?
1 means Yes and 0 means No.
Interactive 0 or 1. Default is 1. Whether or not to correct unrecognized mistakes interactively?
1 means Yes and 0 means No.
SuggestAndWait 0 or 1. Default is 0. Whether or not to popup the suggestions and wait until it is either fixed or manually ignored?
1 means Yes and 0 means No.
WaitNumKeystroke Any number. Default is 64. How many keystrokes Asutype will waits until it dismisses the suggestion popup window.
WaitTickCount Any number. Default is 15000. How many milliseconds Asutype will wait until it dismisses the suggestion popup window.
EnterChoose 0 or 1. Default is 1. Whether or not pressing Enter immediately after a mistake will force the suggestion popup window in the Popup-And-Wait mode?
1 means Yes and 0 means No.
This flag only take affect if EnterPopup is 1.
CancelIgnores 0 or 1. Default is 0. Whether or not pressing the Cancel hotkey will also ignore this mistake until the end of the session?
1 means Yes and 0 means No.
UseShortcut 0 or 1. Default is 1. Whether or not to use the text shortcut feature?
1 means Yes and 0 means No.
PreviewShortcut 0 or 1. Default is 1. Whether or not to show text shortcut preview before expanding it?
1 means Yes and 0 means No.
PreviewLength Any number. Default is 40. The length of the preview text?
1 means Yes and 0 means No.
ArrowTrigger 0 or 1. Default is 1. Whether or not the arrow keys are used as shortcut trigger keys besides those listed in the Options dialog box?
1 means Yes and 0 means No.
EnterTrigger 0 or 1. Default is 1. Whether or not the Enter key is used as a shortcut trigger key besides those listed in the Options dialog box? 1 means Yes and 0 means No.
SpaceTrigger 0 or 1. Default is 1. Whether or not the Space bar is used as a shortcut trigger key besides those listed in the Options dialog box? 1 means Yes and 0 means No.

Action Codes

The <LET> hot code defines variables in your shortcuts. A variable is a place holder in a shortcut, which value is determined at run time. When Asutype expands a shortcut containing a variable, it will analyze the variable and determine its value, then use this value to replace all references of the variable in the shortcut. A reference of a variable is the variable's name enclosed in {} brackets. For example, the following shortcut:

<LET:search-term><OPEN:http://www.google.com/search?q={search-term}>

defines a variable named "search-term". When expanding, Asutype will ask you to enter a search term and search for that term using Google search engine.

A shortcut can have none, one or more variables. If it has more than one variable, each variable must have a distinctive name. The <LET> hot code defines a variable; and all subsequent references of the variable must be enclosed in the {} tag pair. The <LET> hot code can have one of the following format:

Format Action Example
<LET:name=choice1|choice2|choice3...> Define a variable named name which value can be one of the multiple choices listed. The choices are separated by |. Asutype will ask you to pick one choice when it expands the shortcut.  
<LET:name={FOCUS}> Define a variable named name which value is the shortcut's hot text.  
<LET:name={LAST-LINE}> Define a variable named name which value is the last line that you've just typed.  
<LET:name={LAST-WORD}> Define a variable named name which value is the last word that you've just typed.  
<LET:name={CLIPBOARD}> Define a variable named name which value is the current clipboard content.  
<LET:name={CURSOR-POSITION}> Define a variable named name which value is the current cursor position in the x, y format, relative to the upper left corner of the screen.  
<LET:name={CARET-POSITION}> Define a variable named name which value is the current caret position in the x, y format, relative to the upper left corner of the screen.  
<LET:name={LBUTTON-POSITION}> Define a variable named name which value is the last left button clicking position in the x, y format, relative to the upper left corner of the screen.  
<LET:name={RBUTTON-POSITION}> Define a variable named name which value is the last right button clicking position in the x, y format, relative to the upper left corner of the screen.  
<LET:name={USER-NAME}> Define a variable named name which value is the current login name.  
<LET:name={COMPUTER-NAME}> Define a variable named name which value is the current computer name.  
<LET:name={WINDOW-TITLE}> Define a variable named name which value is the current window title.  
<LET:name={APPLICATION}> Define a variable named name which value is the current application executable file.  
<LET:name={ENVIRONMENT}> Define a variable named name which value is the current environment variables, separated by |.  
<LET:name={ENVIRONMENT} environment-name> Define a variable named name which value is the current environmental variable's value.  
<LET: name = {ASK} Question> Ask the user to enter a text and assign the text to variable named name.  
<LET: name = {ASK} Question=choice1|choice2|choice3|...> Ask the user to select one choice between multiple choices and assign the selection to variable named name.  

Notes
Each of the hot codes has its own value and certain usage, but it is their combinations which gives the real power and versatility to the Asutype's shortcut system. For example, the following shortcut will search for the current word that you are editing using Google search engine:

<LET:caretPosition={CARET-POSITION}><LBUTTON:{caretPosition}><LBUTTON><COPY><LET:searchTerm={CLIPBOARD}><OPEN:http://www.google.com/search?q={searchTerm}>

Or the following shortcut will replace the current editing word by the word that the mouse currently pointing at:

<LET:caretPosition={CARET-POSITION}><LBUTTON><LBUTTON><COPY><LBUTTON:{caretPosition}><LBUTTON><PASTE>

Logical Expression

Logical expressions are boolean operations used in <IF> hot code to make a block of text wrapped by <IF> and </IF> codes conditional. A logical expression used in <IF> must be enclosed in a () tag pair. Asutype supports the following boolean operators:

Operator Meaning Example
= Equality check: the result is true if the two sides are equal; otherwise it is false. Yes = Yes is true Yes = No is false
# Inequality check: the result is true if the two sides are different; otherwise it is false. Yes # Yes is false
Yes # No is true
< "Less than" check: the result is true if the left hand side is smaller than the right hand side; otherwise it is false. 2 < 4 is true
2 < 1 is false
<= "Less than or equal" check: the result is true if the left hand side is less than or equal the right hand side; otherwise it is false. 2 <= 2 is true
2 <= 1 is false
> "Greater than" check: the result is true if the left hand side is bigger than the right hand side; otherwise it is false. 3 > 1 is true
3 > 5 is false
>= "Greater than or equal" check: the result is true if the left hand side is greater than or equal the right hand side; otherwise it is false. 6 >= 4 is true
6 >= 8 is false
& Logical AND: the result is true if both sides are true; otherwise it is false (3 > 1) & (Yes = Yes) is true
(3 > 5) & (No = No) is false
| Logical OR: the result is true if any side is true; otherwise it is false (3 > 1) | (Yes = No) is true
(3 > 5) | (No # No) is false

Notes

  • Always accompany an <IF> code with a correspondent </IF>.
  • An <IF> block can contain (nest) another <IF> block.

See Also

 

Logo  
*
* * * *
FAQs * Home *FAQs *User's Manual *Contact Us *