![]() |
Macro Troubleshooting Guide |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
This troubleshooting guide will help you with WordPerfect 5.1 for DOS macro questions. These troubleshooting solutions are similar to the steps a technician will take with you if you call Customer Support. If you find that you are still experiencing problems, please call Customer Support. Missing Tildes Check for missing or extra tildes. Within the macro editor, press Ctrl+Page Up to see the macro commands in their correct format. Each macro command is listed with its correct syntax, including tildes. Misspelled Variable and Label Names Misspelling any of the variable and label names will stop the macro from executing. For example: {TEXT}Amount~Type the amount~ {VARIABLE}Amont~ The variable name Amount is misspelled in the second line. Therefore, the variable will not be printed to the screen as it should. ONNOTFOUND Command When using a search routine, the ONNOTFOUND command must be placed before the search routine. This will capture the Not Found error message and transfer execution to a new level of the macro. For example: {ONNOTFOUND}{GO}end~~ {LABEL}search~ {Search}{Search}{Del} {GO}search~ {LABEL}end~ {PROMPT}The search has been completed~ Watching the Macro Run Run the macro with Reveal Codes on. To turn on Reveal Codes, press Alt+F3, or F11 on an expanded keyboard. Your macro may be prompting for a Yes or No question (other than from a {TEXT} or {CHAR} command). Therefore, the macro will stop while it waits for you to answer the Yes or No question. This might occur when the macro is deleting a code. If Reveal Codes is turned on, the prompt for Yes or No will not appear. Nonexistent Labels and Variables Going to or calling nonexistent labels or accessing nonexistent variables will cause the macro to fail. {NEST} and {CHAIN} Commands If you are using {NEST} or {CHAIN} commands in your macro, remove the {DISPLAY OFF} command in the nested or chained macro to see if it is actually being executed. Too Many Nested Files or Levels The nesting files in your macro may go too deep, or you may be using too many levels. For more information, see Levels near the end of Appendix K: Macros and Merge, Programming Commandsof your WordPerfect 5.1 for DOS reference manual. Slowing Down the Macro Use the Speed command to slow the macro so you can watch it execute. Generally, {SPEED}40~will allow you to see what is happening to the macro. This command executes from the point of insertion to the end of the macro. Using {STEP ON} Use the {STEP ON} command to step through each command in a macro. Look under {STEP ON}in Appendix K: Macros and Merge, Programming Commands of your WordPerfect 5.1 for DOS reference manual to check the values returned by the program for each keystroke or command. Looking at Part of the Macro If the macro is large, place a {GO} command at the top of the macro, then have the macro go to the part of the macro that you think doesn't work correctly. If you find that that part of the macro does not work correctly, check for syntax errors at this location or check a couple of lines before this part of the macro. Make sure variables are assigned the settings you expected them to have. Duplicating the Problem Try to duplicate the problem by creating a new macro that is exactly the same. Rerecord all formatting keystrokes in the new macro. Execute that macro to make sure that it works correctly. Missing {RETURN} Command Make sure that all subroutines end with a {RETURN} command. Missing Loop Terminators Each loop needs to end with one of these commands: {END IF}, {END WHILE}, or {END FOR}. If one of these commands is missing, the commands in the loop structure are executed the first time through, then macro execution is terminated. Without an END command, the macro cannot find the terminal point of the loop, so it can never return to the beginning of the loop to repeat. Numeric Operations Won't Work on Strings You cannot perform a numeric operation on a string. This usually happens when you use an invalid character (such as a decimal, period, space, or comma) in an expression assigned to a variable. For instance, you cannot assign the value of 3.5 to variable 1 because the decimal point is an invalid character. Restarting WordPerfect It may help to exit then restart WordPerfect. Run the macro again, and the problem may be corrected. |
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. |