home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
pbaseiv.zip
/
P4SPR004.TIP
< prev
next >
Wrap
Text File
|
1991-12-16
|
2KB
|
56 lines
When you need to repeat a few keystrokes in 1-2-3 but won't
need to repeat them in the future, writing a full macro may
be more trouble than it's worth. To simplify the job of
creating throwaway commands, I wrote a macro that records
keystrokes and plays them back a specified number of times.
A ready-to-use copy of the macro [shown below] is in the
file P4SPREAD\RECORDER.WK1 on your PowerBase *.* Volume IV
diskette. Note that \R and \P are range names.
To see how the macro works, move to a blank cell and press
<Alt>-R to begin recording. Type the keystrokes you want to
repeat, then press <F10> to stop recording. Move to another
cell, and press <Alt>-P. Enter the number of repetitions,
and press <Enter>. The macro will then type your keystrokes
as many times as you've specified.
William O. Johnson
Racine, Wisconsin
Editor's note: The macro is limited to 480 characters, but
the number of keys it can store may be less, as some keys
take more than one character. For example, <Cursor Down> is
represented as {DOWN}. But if you need to increase the
recorder's memory capacity, it's not hard to do. Simply add
more strings (str3, str4, etc.) to hold the additional data,
and replace the simple test in AB9 with code that calculates
the label of the cell being filled from the counter value.
AA AB AC AD AE AF
1 \R {let str1,""}{let str2,""}{let counter,0}{store}
2
3 str1
4 str2
5
6 store {get char}
7 {if char="{graph}"}{return}
8 {let counter,counter+@length(char)}
9 {if counter>240}{branch fillstr2}
10 {let str1,+str1&char}{branch char}
11 fillstr2 {let str2,+str2&char}
12 char
13 {branch store}
14
15 repeat
16 counter
17 \P {getnumber "How many repetitions? ",repeat}
18 {for counter,1,repeat,1,str1}
Title: Repeat Business
Category: SPR
Issue date: May 1991
Editor: Tom Swan
Supplementary files: P4SPREAD\RECORDER.WK1