Top Navigational Bar

Macro Questions and Answers Pre-Release Train
DocumentID: 649922
Revision Date: 29-Feb-96 8:19:38 PM

The information in this document applies to:
WordPerfect® 5.1 for DOS

Problem

Symptoms: What is the use of KTON and NTOK. Solutions: KTON or key to number will assign the key to a number. Dividing this number by 256 will show what character map and number the key belongs to. The NTOK or number to key will take the number and assign it to it's key. One use for these commands is performing a sort, select, and save. The macro can select all records from a file that begin with A. These can be sorted alphabetically and saved. The macro can then take the A, use key to number to get it a numeric value, add one, then use number to key to get B. This can be used as the key for sorting and selecting. Whether the sorting or selecting is performed first, when the document needs to be split into smaller documents in alphabetical order, the KTON and NTOK make the macro perform smoother.

Question:
Will Block Append, Copy, or Move bring the codes?
Answer:
If the codes you want moved are included in the block, they will come with the text, however if they aren't included in the block then they will be left out.

Question:
What range of Pascal features are in advanced commands?
Answer:
The comment (syntax is different), assign, call (again the syntax is different), case, case call, else, end for, end if, end while, for, foreach, go, if, if exists, input (writeln in pascal), label (called a procedure), len, look, mid, next, pause, prompt, return, speed, variable, wait, and while.

Question:
Can you read the initial settings with a macro?
Answer:
You can tell if information is placed in the different areas of the initial settings by using the system variable command. However it will not return what is contained in those locations.

Question:
What is the {End For} for?
Answer:
It is the end of the for loop. It acts the same as the end if in the if statement.

Question:
Can you position the input code using {^P}?
Answer:
Yes.

Question:
What is the difference between {Input} and {Status Prompt}?
Answer:
The input command can be moved around, while the status prompt must remain on the status line. The status prompt will be erased when a blank status prompt is inserted afterwards.

Question:
Will 5.1 still have variables 0 - 9?
Answer:
Yes.

Question:
Can you bring 5.1 macros into the 5.0 macro editor?
Answer:
The 5.0 macro editor wasn't intended to handle 5.1 macros.

Question:
In a regular document screen, will item left go to the left margin?
Answer:
No, in fact it won't do anything. You must be in columns or tables for items left and right to work.

Question:
Can the {For Each} command be used to count the page #'s in the document?
Answer:
Not that I can find. The for each command requires the variables to be listed in with the command, so you will need to know what they are before hand.

Question:
Does {Block Copy} automatically turn block on?
Answer:
No it doesn't. Either the macro must contain the command Alt-F4 and move the cursor to make a block, or you must have a pause to allow the user to make one manually. Once this is done, then it will automatically prompt you to move the cursor and press enter.

Question:
What are the advantages to using menu off/on over display off/on?
Answer:
Nothing. The menu on/off commands were intended to hide the pull down menus from the users sight while a macro ran. The problem comes up that while the menus are hidden, the keystrokes aren't.

Question:
What is the limit on character length in a macro?
Answer:
The limit that can be contained inside of a variable is 128 characters. The actual length of a variable name is unknown, however only the first seven letters are evaluated for uniqueness.

Question:
Do you have to have real numbers to be used in macros? (Can decimal numbers or fractions be used?)
Answer:
Only whole numbers can be used for manipulations in any macro.

Question:
Why do some macro commands show up in caps and some do not?
Answer:
The true command is capitalized, whereas keystroke commands have only the first letter of each word in the command capitalized. For example: {Block Append} is a keystroke command (Ctrl-F4, 1, 4), {NEST}macroname~ is a programming command that doesn't involve any keystroke commands.

Question:
Can you edit a shell macro inside of a 5.1 macro editor?
Answer:
No, the .MRS files are different

Question:
Is the while command the same as a loop?
Answer:
Yes, the while command is one type of loop. It will loop as many times are needed to complete a certain operation. This differs from the for which will repeat a given number of times.

Two major changes since the training class:
{Input} has been changed so that enter will take the prompt away and continue on with the macro.

{Pause Key}key~ is a new command added recently. It will pause the macro until the specified key is pressed

Answer:

Details:


Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER.