Rockwell Automation 1747-PBASE BASIC Development Software Programming Manual User Manual
Page 60

Publication 1746-PM001A-US-P
4-12 Editing a Program
Keystroke macros make your work easier and faster by allowing you to cut down on
repetitive actions. For example, suppose that every time you create a program file,
you enter the same information in a header. You can create a file that contains this
information and splice it into each new program file. To do this, you create a file
containing the header information, save it to disk under the name
header
, and
then use the
Merge file from disk
option from the File menu.
This makes things faster, but you still have to go through the steps of getting the
file and merging it into your program. Creating a keystroke macro would allow you
to complete the merge process with one keystroke.
Follow the step by step procedure below to create a keystroke macro to consolidate
the file merging in the above example. Remember that Hypertext help is available
to assist you.
1. Press
[Alt-F10]
to begin keystroke recording.
Notice the blinking reverse R character in the status line at the top of the
screen. The R stands for recording and alerts you that all keystrokes are being
recorded until you press
[Alt-F10]
again.
2. Press the keys that you would use to accomplish the file splicing:
•
[F2]
brings up the Main menu
•
[F]
selects the File menu
•
[M]
selects
Merge file from disk
••••
[type in the name of the file to load]
••••
[Enter]
3. Press
[Alt-F10]
again to stop keystroke recording. Once recording is
terminated, you asked if you want to save the keystroke macro. Select the
Yes
option. The
EDITING KEYSTROKE MACRO
dialog box appears. You are
prompted to enter a description, QuickStroke key assignment, and mode
specification for the keystroke macro.
4. Type in
Company header
, the description for this keystroke macro. DO NOT
press
[Enter]
. Doing so will save the macro without a QuickStroke
assignment. If you press
[Enter]
by mistake, you can return to the
EDITING
KEYSTROKE MACRO
dialog box by pressing
[F3]
.
IMPORTANT
When recording keystrokes to create a keystroke macro, do not
use the mouse to select menu items or to position the cursor. Use
the actual keystrokes, including the function keys and the
appropriate letter keys to select menu item.
IMPORTANT
When recording keystrokes, avoid using the cursor keys to select
menu items or filenames. If you record cursoring down to select
the sixth file in the list, and that list increases or decreases in
number, you will probably end up selecting the wrong file.