to invoke a larger text editor.
See also: Macro Editor and How to Create Macros In SKY Index
Each key in a macro is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, use "A" for the macro text. If you want to represent more than one character, append each additional character to the one preceding it. To represent the letters A, B, and C, use "ABC" for the macro text.
The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses ( ) have special meanings. To specify one of these characters, enclose it inside braces. For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning, but you must enclose them in braces as well, because in other applications for Microsoft Windows, brackets do have special meaning that may be significant when dynamic data exchange (DDE) occurs. To send brace characters, use {{} and {}}.
To specify characters that aren't displayed when you press a key (such as Enter or Tab) and keys that represent actions rather than characters, use the codes shown below:
Macro Codes
| Key | Code |
| Backspace | {BKSP} or {BS} |
| Break | {BREAK} |
| Caps Lock | {CAPSLOCK} |
| Clear | {CLEAR} |
| Del | {DELETE} or {DEL} |
| Down Arrow | {DOWN} |
| End | {END} |
| Enter | {ENTER} or ~ |
| Esc | {ESCAPE} or {ESC} |
| Help | {HELP} |
| Home | {HOME} |
| Ins | {INSERT} |
| Left Arrow | {LEFT} |
| Num Lock | {NUMLOCK} |
| Page Down | {PGDN} |
| Page Up | {PGUP} |
| Print Screen | {PRTSC} |
| Right Arrow | {RIGHT} |
| Scroll Lock | {SCROLLLOCK} |
| Tab | {TAB} |
| Up Arrow | {UP} |
| F1 | {F1} |
| F2 | {F2} |
| F3 | {F3} |
| F4 | {F4} |
| F5 | {F5} |
| F6 | {F6} |
| F7 | {F7} |
| F8 | {F8} |
| F9 | {F9} |
| F10 | {F10} |
| F11 | {F11} |
| F12 | {F12} |
To specify keys combined with any combination of Shift, Ctrl, and Alt keys, precede the regular key code with one or more of the following codes:
Note: When specifying a keystroke with the ctrl, alt or shift keys, be sure to use a lowercase letter or the keystroke will not be recognized.
To specify that Shift, Ctrl, and/or Alt should be held down while several other keys are pressed, enclose the keys' code in parentheses. For example, to have the Shift key held down while E and C are pressed, use "+(ec)". To have Shift held down while E is pressed, followed by C being pressed without Shift, use "+ec".
To specify repeating keys, use the form {key number}; you must put a space between key and number. For example, {LEFT 42} means press the Left Arrow key 42 times; {h 10} means press h 10 times.
An Example
For an example let's assume that you are writing an index to a computer manual and that there will be frequent instances where you will want to create a new entry out of an existing entry with the following modifications:
standard toolbar, copy button, 32
Duplicate this and translate to:
copy button (standard toolbar), 32
Here is what needs to be done in English:
- Use the duplicate and swap feature to duplicate the record and swap the main and Sub1 headings.
- Edit the new main heading, adding a space and both opening and closing parentheses.
- Move the grid marquee to the Sub1 cell.
- Cut the contents of the Sub1 cell to the clipboard.
- Move the grid marquee back to the Main cell.
- Go into Edit mode and move the text cursor between the opening and closing parentheses.
- Paste the contents of the clipboard between the parentheses.
Below are the macro codes needed to perform these actions. First, the macro’s codes are listed numerically according to the action the macro is designed to handle from the list above. Then the entire macro as it should be entered into SKY Index is shown.
- ^p
- {f2} {(}{)}
- {tab}
- ^x
- {left}
- {f2}{left}
- ^v
^p{f2} {(}{)}{tab}^x{left}{f2}{left}^v
Copyright (c) 2007, SKY Software. All Rights Reserved.
Comments (0)
You don't have permission to comment on this page.