Get Help

The Let Hot Code
Pro Version Only

The <LET> hot code defines a variable and re-uses it in the subsequent processing of the shortcut.

  • A variable is a place holder in a shortcut, whose 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 to the variable in the shortcut.
     
  • A reference to 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 the Google search engine.
     
  • The references are case-sensitive, which means, Asutype will replace the reference with the value having the same case as the case of the reference. For example, the following shortcut:
    <LET:he or she>{He or she} is a good student and {he or she} is studying hard.
    At run-time, if you enter she for the value of the variable, then the shortcut will be expanded to:
    She is a good student and she is studying hard.
    Note the capital case of the first value "she" and the normal lowercase of the second "she" in the final result. That is because the fist reference to the variable is in capital, while the second reference to the variable is in lower case.
     
  • 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 to the variable must be enclosed in the {} tag pair. The <LET> hot code can have one of the following formats:
     
Format Action Example
<LET:name> Define a variable name whose value will be asked to enter at run-time. <LET:sport>Playing {sport} is fun.

will ask you to enter something for the variable sport. If you enter tennis, your final text will be:

Playing tennis is fun.
<LET:name=value> Define a variable name whose value is the value. <LET:sport=golf>Playing {sport} is fun.

will make your final text be:

Playing golf is fun.

Note that unlike the <ASK> code, Asutype will not ask you to confirm anything.
<LET:name=choice-1| choice-2|choice-3...> Define a variable name whose 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:sport=baseball| soccer|tennis| golf>Playing {sport} is fun.

will ask you to pick one from a list of four options: baseball, soccer, tennis and golf. If you pick baseball, your final text will be:

Playing baseball is fun.
<LET:name={ASK} question> Define a variable name whose value will be asked to enter at run-time. The pop-up box has a title of question. <LET:sport={ASK} What sport to play?>Playing {sport} is fun.

will ask you to enter something for the variable sport. If you enter tennis, your final text will be:

Playing tennis is fun.

The pop-up box has the title "What sport to play?"
<LET: name = {ASK} question= choice-1|choice-2|choice-3|...> Ask the user to select one choice between multiple choices and assign the selection to variable named name.

The pop-up box has a title of question.
<LET:sport={ASK} What sport to play?=tennis| golf|footsy>Playing {sport} is fun.

will ask you to pick one from a list of three options: , tennis, golf and footsy. If you pick footsy, your final text will be:

Playing footsy is fun.

The pop-up box has the title "What sport to play?"
<LET: name = {CHOOSE} title = choice-1|choice-2| choice-3|...> Ask the user to select one choice between multiple choices and assign the selection to variable named name.

The pop-up box has a title of title.
<LET:sport={CHOOSE} What sport to play?=tennis| golf|footsy>Playing {sport} is fun.

will ask you to pick one from a list of three options: , tennis, golf and footsy. If you pick footsy, your final text will be:

Playing footsy is fun.

The pop-up box has the title "What sport to play?"
<LET: name = {XCHOOSE} separator: title =choice-1| choice-2|choice-3|...> Ask the user to select one or more choices between multiple choices and assign the selection to variable named name.

The pop-up box has a title of title.

The final choices are separated by separator.
<LET:sport={XCHOOSE} ^n and :What sport to play?=tennis| golf|footsy>Playing {sport} is fun.

will ask you to pick one or more from a list of three options: , tennis, golf and footsy. If you pick them all, your final text will be:

Playing tennis and golf and footsy is fun.

The asking box has the title "What sport to play?"

Note that the separator is " and " with the space before and after the "and". The ^n is just a marker to make the first space before "and" possible. For more on the separator, see the notes in the Action hot codes topic.
<LET:name={TIME} date-time-format> Define a variable name whose value is the current time with the format date-time-format.

For details on the format, see the Date and time hot codes topic.
<LET:today={TIME} %a>Today is {today}.

If you expand this shortcut on Wednesday, the final text will be:

Today is Wed.

If you expand this shortcut on Friday, the final text will be:

Today is Fri.
<LET:name={FOCUS}> Define a variable name whose value is the shortcut's hot text.  
<LET:name={LAST-LINE}> Define a variable name whose value is the last line that you've just typed.  
<LET:name={LAST-WORD}> Define a variable name whose value is the last word that you've just typed.  
<LET:name={CLIPBOARD}> Define a variable name whose value is the current clipboard content.  
<LET:name={CLIPBOARD} #key> Define a variable name whose value is the current content of the clipboard #key in Asutype's multiple clipboards.  
<LET:name={CURSOR-POSITION}> Define a variable name whose 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 name whose 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 name whose 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 name whose 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 name whose value is the current login name.  
<LET:name={COMPUTER-NAME}> Define a variable name whose value is the current computer name.  
<LET:name={WINDOW-TITLE}> Define a variable name whose value is the current window title.  
<LET:name={APPLICATION}> Define a variable name whose value is the current application executable file.  
<LET:name={ENVIRONMENT}> Define a variable name whose value is the current environment variables, separated by |.  
<LET:name={ENVIRONMENT} environment-name> Define a variable name whose value is the current environmental variable's value.  
<LET:name={TEXT-FILE} full-file-path> Define a variable name whose value is the content of the text file.  

© 2016, Fanix Software. All rights reserved.
The smart all-in-one typing software for immediate mistake-free and fast typing!

Designed For:

Spell Check Anywhere You Type - Automatic Typos Correction - Word & Text Expansion - Automation