Hot Keyboard

macros for Windows

Automate Windows with macros
Main Download Purchase Support
<< Previous | Table Of Contents | Next >>
screen20.gif

This action type allows you to paste text directly into applications and/or emulate keystrokes. In addition, it is possible to include date/time stamps, entire text files, special symbols and more.

There are two ways you can paste text into a document with the paste text macro:
  • "via clipboard" (fast)
  • by playing keys (slow, but can accomplish more)

Action Parameters

The "Play keys instead of using clipboard" option, when checked, will enter the text you want to paste key by key. This is a slower method than using the clipboard but it may be successful even when an application does not accept text from the clipboard. If you find your paste-text macro is not working with some application, just check the "Play keys instead of using clipboard" and your macro will now work, although slower than before.

Text to paste - use this box to type the text you want to paste into documents.

To include special values (such as date, time, files, special keys) there are several methods to use. These values can be inserted using

Specials menu
Specials menu
Extended editor
Extended editor

The following formal syntax is for advanced users:

$(Time:<timeformat>) - insert date/time stamps

<timeformat> - set of time variables, user configurable:

  %x - default date format (long)
  %#x - default date format (short)
  %X - default time format
  %d - day of month
  %m - month
  %y - year (two digits)
  %Y - year (four digits)
  %H - hours (24h format)
  %I - hours (12h format)
  %M - minutes
  %S - seconds # - this modifier is used to remove leading zeroes from digits (%#m, %#H, etc)

Examples:

$(Time:%m-%d-%Y)
$(Time:%x %X)

$(Tab) - insert the Tab symbol (via clipboard method), or emulate aTAB key press (play keys method).

$(Enter) - insert the carriage return symbol (via clipboard method), or emulate anENTER key press (play keys method).

$(Ctrl+Enter) - insert the carriage return symbol (via clipboard method), or emulate aCtrl+ENTER key press (play keys method).

Tip: Ctrl+Enter can be used to insert the carriage return (CR) symbol into a text box (to wrap text), in those cases where an Enter key press would close the dialog box.

$(Currency) - Currency symbols (for different countries)

$$ - Dollar sign

$(File:<filename>) - Insert a complete text file

Example:

$(File:c:\my documents\mytext.txt)

$(Input:<deftext>) - Insert custom text. This advanced feature brings out an input dialog where you can enter the string which will replace the "$(input:..)" text before pasting it to the destination application. You can specify the default value for the input with <deftext>. Please note that the colon ":" is an obligatory symbol and it must present even if there is no default value specified, i.e. $(input:).

If you specify more than one $(input:) with the same default text, Hot Keyboard asks you only for the first of these $(input:) and substitutes the entered text for all occurrences of $(input:) with this default text. Example:

Hello, $(input:friend)!$(Enter)
It's $(input:me).$(enter)
...
Bye, $(input:friend)!

Input dialog

In the input dialog you can use the "Tab" or "Enter" keys to proceed to the next input value and the "Shift-Tab" key combination to get back to the previous input value. The "Escape" key cancels the input (and terminates execution of this macro, i.e. no text will be pasted) and the "Ctrl-Enter" key conbination confirms the macro at any time (i.e. not entered values will remain at their defaults).

The closing round bracket in the default value can be specified as \) and the backslash itself as \\. Example:

My personal phone number is $(input:(+1\)555-55-55).

The $(input:) feature is also available for the Execute a program and Launch web browser macros.

$(clipboard) - insert the clipboard content. When a macro with the $(clipboard) special value is executed, all occurrences of this value is replaced with the clipboard content (for the moment when this macro is executed).

$(selection) - insert the text that is currently highlighted in the active application. This special value is replaced with text that is highlighted in the active application when this macro is executed.

$(input:$selinput) feature. If you specify $selinput as the default text for the $(input) feature, Hot Keyboard first tries to get text that is currently highlighted in the active application. If there is no highlighted text, Hot Keyboard brings out the standard input dialog with no default value.

$(var:<varname>) inserts value of the given (by <varname>) Hot Keyboard variable, e.g. $(var:My E-Mail Password).

The $(clipboard), $(selection), $(input:$selinput) and $(var:...) features are also available for the Execute a program and Launch web browser macros.

"Play keys" method ONLY features:

$(Escape) - emulate Esc key

$(Key:<keycode>) - play key specified by its key code

Examples:

$(Key:00,08) - Backspace

$(Key:01,09) - Shift+Tab

Tip: You can create a custom key by using "Special key" then "Custom key"

Example:

Paste text example

See also:

Autoreplace action type
<< Previous | Table Of Contents | Next >>

  © 1998-2016 Imposant