Top Navigational Bar

Macros - Assigning Prompt Attributes
DocumentID: 652726
Revision Date: 29-Feb-96 8:29:18 PM

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

Problem

Solutions: Users can assign different attributes to the menu prompts of a macro. This enables prompts to display in different colors, depending on the screen colors selected in Setup. For example, users can display the prompt with the Fine attribute by entering the following in a macro:

{PROMPT}{^N}{^D}Message Prompt{^O}{^D}~

A "Message Prompt" will display on the status line in the color that represents Fine in Setup. {^N} turns on the attribute, {^O} turns it off, and {^D} represents the Fine attribute.

However, some prompt attributes don't display properly when assigned through a macro. To ensure that the attributes work, a {^Q} should be placed directly before the display attributes start. For example:
{CHAR}1~Is the author name {^Q}{^N}{^O}{VARIABLE}name~{^O}{^N} (y/n)?~

A control character exists for each attribute except for Extra Large. Extra Large does not have a control character for a number of reasons. Internally, Extra Large has a value of zero. Users cannot put a zero in a string because a zero terminates the string. The hexadecimal value of Extra Large is 800h. This code is somehow the same for Compose, so whenever 800h is entered in a macro string, it is treated as Compose rather than Extra Large.

However, 800h can be converted to the number 32768 which represents the attribute, Extra Large. Using this value does not cause problems in the macro string. To display a menu prompt in the color of Extra Large, users can insert the following commands in the macro:

{PROMPT}{^N}{NTOK}32768~Message Prompt{^O}{NTOK}32768~~

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.