|
Novice level
- http://www.shkatz.com/macrotut/ - A macro tutorial by Seth Katz aimed at beginning-level
macro writers. No previous macro-writing or programming experience
of any kind is assumed.
- Macro
Tips and Tricks - Files from Ron Hirsch
to help beginners record and/or write their own macros.
- Easy Play - Three easy ways to play macros (and do other things).
Intermediate to Advanced
level
- First, be sure to add a Macros Help
selection to your WordPerfect Help menu (if it is not already
there).
- For example, in WP9+, right-click the top
menu or toolbar, then click Settings..., then the Menus tab in
the Customize Settings window. Select the appropriate menu (such
as <WordPerfect 9 Menu>), then click on Edit. In the next
window, in the Menu Editor's Features tab, select Help in the
"Feature categories" list. Next, select Macros... in
the features window, then click Add Menu Item. Optional: With
the Menu Editor window still open, put the cursor over the new
menu item, hold down the left-mouse key and drag it leftward
and then downward into the Help menu.
- You can learn many basic WP macro techniques
and error-trapping methods by examining the macros others have
written.
- My own macros are heavily annotated to explain what is happening
at almost every step of the macro's execution. You'll find menus,
search and replace functions, loop techniques, and many other
"snippets" of code you can use in your own work.
- You'll also find that I generally don't use
the more complicated routines if I can avoid them (e.g., callbacks
or complex arrays), unless they are self-contained in a snippet
that could be pasted into other macros (such as my "Please
Wait ..." messages). I'm not a programmer by trade, so I
look for simple ways of doing something without using macro commands
I don't fully understand or that don't work they way they are
supposed to work.
- Doug Loudenback's "A
Common Person's Macro Manual" - an excellent (and free)
reference for macro writers.
- http://gmccomb.com/ - Gordon McComb, author and macro programmer. On
this site you'll find his WordPerfect Support CD-ROM,
WordPerfect for Windows Macros, 201 PowerMacros (WP7/WP8)
and other help for the beginner to advanced user. See also Gordon's
printed macro tutorial at http://gmccomb.com/tutor/.
- The WordPerfect
8 Macros Manual in HTML. [There is also the WPO2000 (WP9)
PerfectScript and Macro User Guide. This is on CD1 as a PDF file:
..corel\Shared\REFCNTR\Macro9en.pdf.]
- Julie Jeppson's Perfect
Script Journal contained monthly articles of particular usefulness
to those who want to learn to write macros. The Journal hasn't
been updated for several years, but it still contains useful
articles. For example:
- For a little help creating menus and other
dialogs with the Dialog Editor (WP7 and later), see Julie's "Creating Macro Dialog
Code from Dialog Editor Dialogs."
- Normally, after creating a dialog with the
Dialog Editor you need to put some code into the body of your
macro to display the dialog, something like this:
- DialogShow("menu"; "WordPerfect")
// Here, "menu" (case-sensitive) is the name of the
dialog
vAns:=MacroDialogResult // Store the result of the user entry
(OK, Cancel, etc.)
If(vAns=2) Quit Endif // If "Cancel", exit
- Note that if you create a dialog in the Dialog
Editor and then copy and paste the dialog into the body
of your macro's code (as explained in her article's paragraph
6), you should also:
- (1) revise the DialogShow() command to something
like DialogShow("menu"; "WordPerfect";;"OKBttn")
-- where the first parameter is the name of the dialog and the
last parameter is the default button; and
- (2) add a DialogDestroy command at the end
of the Dialog code section, like this: DialogDestroy("menu");
and
- (3) remember to rename the dialog in the
Dialog Editor (e.g., "menuBAK"), since you can't have
the same dialog name in the Editor and in the body of the macro's
code.
- Note that in paragragraph 9 of her article
("Just before your DialogShow command...") she cautions
you to exit the macro after saving. This is an easy step to forget,
and if you do forget, the new dialog won't be placed in the Dialog
Editor.
- For her Macro and Merge workbooks, see http://home.comcast.net/~jj84097/wpmacros/books.htm.
Of particular note are her lists of RightCodes at http://wpmacros.com/rightcodenumeric.htm
or http://wpmacros.com/rightcodecode.htm.
- if you need a list of all macro commands,
here's a tip on how to get a listing from Gerald Kumpf (posted
on a Corel newsgroup, 10/23/02):
- '. . .to get a list of commands:
- 1. Start PerfectScript as a stand alone [e.g.,
if you use WP9, look for PS90.exe and run it]
2. Press Ctrl+Alt+Shift+Enter simultaneously to activate Advanced
features of PerfectScript
3. Click Help | Macro Command Browser
4. Choose WordPerfect-EN as Command Type
5. Click Brief Dump (for a list of Macro commands) or Full Dump
(for a list of commands plus details)
- An even better alternative to a list of commands
is to put the Macro Help button on your main tool bar [or the
main menu; see the first paragraph in this section above] and
use the "Find" function to search for key words. In
this case "Cell" brings up all commands with the word
"Cell" in them and "Pos" brings up all the
"PosCell..." commands. It also brings up a list where
you can find examples of some commands in actual use in sample
macros. . .
All user levels
|
All user levels
- FIrst, an important definition of WordPerfect
templates (from "Automating
WordPerfect Templates"):
- "In WordPerfect, a template is a document
on your disk with a special filename extension, ".wpt,"
where the "t" stands for "template".
Think of it as a stencil or model that you can use to make (or
"spawn") copies of the original ... Like other word
processors, every document you create in WordPerfect is based
on a template. Even new, empty documents with names like Document1
are based on a special template, called the default
template ... Templateswhether default or customdefine
formatting and program options for a document such as margins,
tab settings, styles, menus, toolbars, and keyboard definitions...."
- To create your own templates, see Custom
templates.
- To find, modify, or fix the program's default
template, see The default template.
Intermediate to Advanced
level
- To automate templates with prompts,
etc., see "Automating WordPerfect Templates" on the
Tips page at http://wptoolbox.com/tips.html#AutoWPT
- Many WordPerfect 10 templates and Projects
(both are English versions) can be downloaded from Corel's
FTP site and serve as models for your own templates. They
can be downloaded individually or as a batch using the ZIP file
at the bottom of the site's page.
- You may be able to use these templates in
later versions of WordPerfect. For example, one WP12 user asked
Charles Rossiter (Corel C_Tech) how to do this with the WP10
calendar project. [Be sure to substitute your current
version number (e.g., 11, 13, etc.) where you see "12"
in the items below.] Here's
Charles's reply on 8/25/04:
"You can use [these Projects] in WPWin12.
Two steps are needed.
1. The WPWin10 projects require two additional
files to be created in the WPWin12 template folder: uawp10en.dll
and uawp10en.ast. These files MUST be copies of uawp12en.dll
and uawp12en.ast -- NOT the versions from the WPWin10 template
folder.
2. Copy the WPWin10 template files (*.wpt
and *.ast) to the WPWin12
template folder. Then search for file Projects.Usr for WPWin12,
and delete it.
Now when you next launch WPWin12 and do File,
New from Project, the catalogue file Projects.Usr will be re-created
and you will have access to the WPWin10 templates and Perfect
Experts."
|