Dec 242017
 
This macro quickly (and painlessly) constructs commonly used macro commands. It helps you write macros in the Macro:Action & Key:Action editor windows.
File MACMAKE.ZIP from The Programmer’s Corner in
Category Word Perfect
This macro quickly (and painlessly) constructs commonly used macro commands. It helps you write macros in the Macro:Action & Key:Action editor windows.
File Name File Size Zip Size Zip Type
MACMAKER.DOC 4615 1587 deflated
MACMAKER.WPM 6543 1343 deflated

Download File MACMAKE.ZIP Here

Contents of the MACMAKER.DOC file



MACMAKER.WPM


BY Onik Arian (CIS ID 70671,507)

This program is free. You may modify it anyway you like.
******************************************************************************

INTRODUCTION:

This macro quickly (and painlessly) constructs commonly used macro commands.
It helps you write macros in the Macro:Action & Key:Action editor windows.
Put the macro and its doc file in your *.WPM directory. Then, either rename
the macro to an ALT key name (such as ALTM.WPM) or edit a keyboard (*.WPK),
go to the Key:Edit window, and {RETREIVE} this macro into a CTRL or ALT key.
If you don't do one of the above, you will not be able to run the macro from
the Macro:Action or Key:Action window.

Note: I prefer to {RETREIVE} the macro into my keyboard that I use when I
edit or create macros. It is called TOOLS.WPK, and has a number of other
macros to help write macros. TOOLS.WPK will be uploaded to WPSGA LIB 4
sometime in August '90. Look for it (if you are interested).


HOW THIS MACRO WORKS:

The opening prompt is:


1 {IF} 2 {FOR} 3 {WHILE} 4 {CASE} 5 {CHAR} 6 {TEXT} Choice? 0


NOTE: In all of the options below, you will first be given the option to
have the commands INDENTED in the macro file that you are editing.



1 {IF}

This option will write {IF}{ELSE}{ENDIF} structures. First you are asked if
you want the commands to be indented. Then you are asked if you want {IF}
to check for Yes/No or Multiple Choices.

If you choose Yes/No, the macro will write an {IF} command that checks for
"Y", "y", and "{ENTER}" as the key press, or {ELSE} it will branch to another
choice.

If you choose Multiple Choices, you will be asked how many choices (2-9).
You select the number, and the macro will write the appropriate {IF} commands.

For example, if you choose Indent, Multiple Choices, and "3", then the macro
will write:

{IF}"{VARIABLE}Key~"="1"~

{ELSE}
{IF}"{VARIABLE}Key~"="2"~

{ELSE}
{IF}"{VARIABLE}Key~"="3"~

{ELSE}
{END IF}{END IF}{END IF}

NOTE: The {CHAR} & {TEXT} constructs use "Key" as the variable in which store
user input, so the above {IF} construct also check for "Key".



2 {FOR}

This option will write {FOR}{END FOR} structures. You are asked how many
times the {FOR} command is to cycle. Then the command is written for you.



3 {WHILE}

This option will write a {WHILE}{END WHILE} command.



4 {CASE}

This option will write {CASE} structures. First you are asked if you want the
commands to be indented. Then you are asked if you want {CASE} to check for
Yes/No or Multiple Choices.

If you choose Yes/No, the macro will write a {CASE} command that checks for
"Y", "y", and "{ENTER}" as the key press. If you choose Indent, it writes:

{CASE}{VARIABLE}Key~~
{ENTER}~Yes~
Y~Yes~y~Yes~
N~No~n~No~
~

If you choose Multiple Choices, you will be asked how many choices. You
select the number, and the macro will write the appropriate {CASE} commands.

For example, if you choose Indent, Multiple Choices, and "3" then the macro
will construct:

{CASE}{VARIABLE}Key~~
{ENTER}~1~
1~1~
2~2~
3~3~
~


5 {CHAR}

If you choose this option, the macro will prompt you with the following:


1 Y/N (Bold) 2 Y/N (Inv) 3 Multi (Bold) 4 Multi (Inv) Choice? 4


Choices 1 or 2 construct Yes/No {CHAR} prompt in either Bold or Inverse
colors. Choices 3 or 4 construct a Multple Choice {CHAR} prompt in either
Bold or Inverse colors, AND let you select the number of choices (2 to 6).

For example,if you choose Indent and "4", the macro will construct:

{CHAR}Key~
.{^R}1{^S}.Sample..
.{^R}2{^S}.Sample..
.{^R}3{^S}.Sample..
.{^R}4{^S}.Sample..
...Choice:.{^R}1{^S}{LEFT}~



6 {TEXT}

If you choose this option, the macro will prompt you with the following:


1 Bold 2 Inverse Choice? 2


You can choose between the 2 colors to construct the {TEXT} statement.



Hope you enjoy this macro!

Onik Arian
70671,507


 December 24, 2017  Add comments

Leave a Reply