SKY Index Professional v6.0

  • This free trial of Professional Edition is limited to 3 users or less. Contact an admin about purchasing Professional Edition.

 

Writing your own macros

Page history last edited by Anonymous 2 yrs ago

Writing your own macros

 

About Macros

 

Macros are invoked by pressing one of the function keys F3 through F12 or Ctrl+Shift+F3 through Ctrl+Shift+F12 for a total of twenty macros.

 

The Macros dialog

 

 

Defining Macros

 

To define macros, do the following:

 

  1. Choose Options->Data Entry Options.
  2. Click the Macros tab.
  3. Enter your macros.
  4. Click OK.

 

Entering Macros

 

To enter macros, enter the text for the macro into the Macro text box next to the function key that you wish to use to execute the macro. You should also enter a description of the macro so that you can remember what it does at a glance. The description is what will be displayed in the buttons of the Macros Toolbar. To enter a description, press and type the description in the Description text box. If you do not enter a description, the macro text will be used as the description.

 

If you need to enter more than ten macros, click 11-21 to display the last 10 macros. You can redisplay the first ten macros by clicking 1-10.

 

Macros can contain commands to perform virtually any keystroke available on your keyboard. Below is a detailed description of how to enter them. If you are writing a lengthy macro, you can press 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

 

KeyCode
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:

 

KeyCode
Shift+
Ctrl^
Alt%

 

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:

 

  1. Use the duplicate and swap feature to duplicate the record and swap the main and Sub1 headings.
  2. Edit the new main heading, adding a space and both opening and closing parentheses.
  3. Move the grid marquee to the Sub1 cell.
  4. Cut the contents of the Sub1 cell to the clipboard.
  5. Move the grid marquee back to the Main cell.
  6. Go into Edit mode and move the text cursor between the opening and closing parentheses.
  7. 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.

 

  1. ^p
  2. {f2} {(}{)}
  3. {tab}
  4. ^x
  5. {left}
  6. {f2}{left}
  7. ^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.