TutorCat

WordPerfect® for Windows
Macro Tutor


19 Easy Steps to Macro Mastery

Covers WordPerfect for Windows
Versions 7, 8, and 9
Macro Programming with PerfectScript


Table of Contents

Introduction

Disclaimer (and Other Stuff)
Copyright Information
Ongoing Support
Companion Book
Using the Applications Disk
Is This Book for You?
Software Compatibility
Ongoing Support

Chapter 1 -- Understanding What Macros Are All About

Macros Are Shortcuts
Where the Word "Macro" Comes From
Macros Can Be Recorded or Programmed
Knowing When to Use Macros
Should You Use a Macro, or Some Other Feature?
Other Features That Are Helpful
Teaming Up the Automation Features of WordPerfect
Self-Test Quiz

Chapter 2 -- Recording and Playing Macros

Getting Ready for Recording
Recording a Macro
Playing a Macro
If You Make a Mistake While Recording
Giving Names to Macros
Avoiding Common Macro Problems
Self-Test Quiz

Chapter 3 -- Different Ways to Play Macros

Playing the Last Macro
Adding a Macro to the Toolbar
Assigning a Macro to a Menu
Assigning a Macro to the Keyboard
Self-Test Quiz

Chapter 4 -- Editing and Printing Your Macros

Recording a Sample Macro
Opening the ITALSENT.WCM Macro
Understanding the Macro Feature Bar
A Brief Discussion of the Innards of a Macro
Watch Out For Mistakes!
Adding a Comment to the Macro
Saving Your Changes
Printing a Macro
Adding a Description to Your Macro
Viewing Macros Without Opening Them
Viewing and Printing the "Shipping Macros"
Self-Test Quiz

Chapter 5 -- Important Macro Concepts

Commands: Macros Are Made of These
Understanding Syntax
Entering Commands
Using Parameter Names
The Concept of Compiling
Using the Macro Tools Toolbar
Using Macros in Templates
Getting Help on Macros
What About Visual Basic for Applications Macros?
Self-Test Quiz

Chapter 6 -- Creating MacrosThat Pause for User Input

Creating a Fax Cover Sheet with Pauses
Creating a Letter Opener Macro and Adding Pauses
Using a Different Key/Action to Unpause the Macro
Telling the User What to Do When a Macro Is Paused
Self-Test Quiz

Chapter 7 -- How to Use Variables

What Is a Variable
Creating and Using Variables
Using Variables To Collect Lots of Data
Saving Space with the BARLAB2.WCM Macro
Building a More Elaborate Variable Collection Macro
Stuff You Can Store in a Variable
Assigning Variables Within a Macro
Self-Test Quiz

Chapter 8 -- Getting Information from the User

GetString: The All-purpose Data Picker-upper
Using GetNumber to Store Number Values
Using GetUnits to Store Measurement Values
Displaying a Menu of Choices
Self-Test Quiz

Chapter 9 -- Asking WordPerfect What It's Doing:All About System Variables

What Is a System Variable
List of Commonly Used System Variables
System Variable Sampler Macro
A Practical Macro for Inserting the Filename
Self-Test Quiz

Chapter 10 -- Inserting Information Into a Document

Inserting Text: An Overview of the Type Command
Positioning the Insertion Point
Selecting Text in the Document
Removing Text Already in the Document
Working Inside Tables
Sample Text for the Test Macros in This Chapter
Self-Test Quiz

Chapter 11 -- Displaying Messages to the User

In Review: Using MacroStatusPrompt
Using the Prompt Command
Using the MessageBox Command
Message Example: Saving All Documents
Message Example: Showing the Time
Self-Test Quiz

Chapter 12 -- Controlling the Flow of Macros

Creating "Zones" In Your Macros
Referencing a Label
Using Labels for "Condition Trapping"
Call Example: A Macro to Select Printing Options
Self-Test Quiz

Chapter 13 -- Macros That Make Decisions: Using the If Command

The Anatomy of the If Command
Commands for True Or False, But Not Both
Getting to Know Operators
Real World If: The TWOKEY.WCM Macro
Nesting If's
Testing More than One Condition
Self-Test Quiz

Chapter 14 -- Other Ways to Make Decisions: Using Switch and Case

The Makeup of a Switch Structure
Providing for a Default Result
Testing for Numeric Matches
Using Multiple Commands for a CaseOf Match
Using Switch with MenuList
Getting Fancy with the Continue Command
Going or Jumping to Other Parts of the Macro
A Practical Example of the Switch Statement
Using the Case Command
Self-Test Quiz

Chapter 15 -- Over and Over Again: Making Macros Repeat Commands

Why and When to Use Loops
Using ForNext
Using ForEach
Self-Test Quiz

Chapter 16 -- More of the Same: Other Ways to Repeat

Using the While Command
Using a A Loop with a Counter
Using Repeat/Until
Using Repeat/Until with Searches
Using Repeat/Until to Assure Proper User Input
Self-Test Quiz

Chapter 17 -- Working with Text Strings

A String is Just a Collection of Characters
Inserting a String into a Document
Counting the Length of a String
Retrieving Just a Portion of a String
Determining the Location of a Given Character
A Practical Example of StrPos and SubStr
Converting String Case
Self-Test Quiz

Chapter 18 -- Creating Custom Dialog Boxes

Accessing the Dialog Box Editor
Creating a New Dialog Box
Setting Control Properties
Resizing and Positioning the Dialog Box
Testing the Dialog Box
Saving the Dialog
Exiting the Dialog Editor
Enhancing the Basic Dialog Box
Connecting the Dialog with the Rest of the Macro
Self-Test Quiz

Chapter 19 -- "How Do I…?"

Play a Macro When Starting WordPerfect
Display the Files In a Specific Directory
Check If a File Exists
Delete a File On Disk
Copy a File on Disk
Close All Files At Once
Save All Files At Once
Save a File With a Random Name
Specify a Directory, Name, and Format for Saved Files
Save a File With a New Name and Delete the Original
Append the Network User Initials To All Saved Files
Check if a Document Is "Blank"
Close or Clear a Document Without Saving
Save a Document Then Close
Insert the Document Name in the Document
Check If The Insertion Point Is at the End of the Document
Check If The Insertion Point Is at the Beginning of the Document
See If One Or More Characters Is in a String
Compare Two Strings Without Regard to Case
Run Programs from Within WordPerfect
Create a Temporary "Scratchpad" to Write Text
Ask the User a Question
Limit the Length of Text for the GetString Command
Limit Entry To Numbers Only
Accept Upper or Lower Case Responses to a Prompt
Display a Prompt in the Status Bar
Make the Macro Wait
Ring the Bell
Recover From Failed Searches
Recover from Errors
Recover from the Cancel Key
Ignore Not Founds, Errors, and Cancels
Prevent a Macro from Generating a "Variable Not Defined" Error
Share Variables Between Macros
Transferring Document Text to a Macro Variable
Change the Case of the Next Character

Appendix A -- Using the Applications Disk

How to Install the Files
File Locations

Appendix B -- Answers to Chapter Quizzes


Index

-
Back