5.0

Table Of Contents
Using the State Keys in Macros
174
If you create a macro longer than 80 characters, let the system wrap the cursor around to the next
line.
Using Plain Text in Macros
Besides using individual keys and key combinations in a macro definition, you can also have the
macro enter plain text. This could be text you include in stories often or text you enter in fields of
a dialog box in iNEWS. Example:
@{ctrl{f9}}~{space} Roll tape - Sound up full {space}{enter}
Whenever you include plain text in a macro, all spaces in the text are preserved. The case
(lowercase or uppercase) is preserved as well.
Dialog Wait Macros
Some macros might attempt to send keystrokes to dialogs before the dialog boxes are available,
but there is a way to prevent that behavior. In the button or keyboard macro definition, a macro
can be instructed to wait for a dialog box. For instance, if a macro should wait for the Local
Printing dialog box before continuing, the syntax is:
{window Local Printing}
. This entry
will cause the macro to pause until the named dialog is available. Place the instruction
immediately following the keystroke that launches the dialog. For instance:
{ctrl p}{window
Local Printing}
. The text following the word window must match exactly the title of the
dialog box. If the text does not match, the macro will pause indefinitely until the user presses the
Escape key to exit the macro.
Using the State Keys in Macros
The Alt, Shift, and Ctrl keys are known as state keys, because their state affects what happens
when another key is pressed, whether they are pressed or not.
To include a state key in a macro:
1. Begin with an open brace ({) to indicate that a key is being pressed.
2. Follow the open brace with the name of the state key, such as Alt.
3. Since a state key does not do anything by itself, enter the name of the next key pressed along
with it. Enclose this key in another set of braces ({ }) if it is a function or numeric keypad
key, such as F7 or kp1.
4. End with a closing brace (}) to indicate the release of the state key. So you’d have something
similar to this:
{alt{f7}}
.