PFindTypeAttr1

Sets the text attributes (font, point size, type style, position, and case) to be used for the search text in the PFind, PChange, and PChangeAll commands.


Command constructor

PFindTypeAttr1(const char * sFontName, short dPointSize, short dLeading, short cTypeStyle, short cPosition, short cCase);
const char * sFontName;
Name of font exactly as it appears on Type menu (maximum of 63 characters)
"Any" for Any font (i.e., to not include font name in search criteria; default setting)
short dPointSize;
Point size of type (from 4.0 to 650.0) in tenths of a point (650.0 = 6500).
kFCAttrAny for Any size (i.e., to not include point size in search criteria; default setting)
short dLeading;
Amount of leading, in points (from 0.0 to 1300.0) in tenths of a point (1300.0 = 13000).
kFCAttrAny to specify Any leading
kParmDefault for automatic leading
short cTypeStyle;
kFCAttrAny for Any (i.e., to not include type style in search criteria; default setting)
kFCAttrNormalStyle for Normal
Or, any combination of the following styles, added together:
kFCAttrBoldStyle for Bold
kFCAttrItalicStyle for Italic
kFCAttrUnderlineStyle for Underline
kFCAttrUtrikethruStyle for Strikethru
kFCAttrOutlineStyle for Outline (Macintosh only)
kFCAttrShadowStyle for Shadow (Macintosh only)
kFCAttrReverseStyle for Reverse
short cPosition;
kFCAttrAny for Any position (i.e., to not include position attribute in search criteria; default setting)
kPositionSuperscript for Superscript
kPositionSubscript for Subscript
short cCase;
kFCAttrAny for Any case (i.e., to not include case attribute in search criteria; default setting)
kFCAttrAllCap for All Caps (full-size capitals)
kFCAttrSmallCap for Small Caps (small capitals)
Story editor only. The PFindTypeAttr1 command works only in story editor. If the story editor is not active, PFindTypeAttr1 throws a CQ_LO_INVALID_MODE exception.

Type styles are additive. To set the cTypeStyle parameter to multiple type styles, add the numeric equivalents for the styles. For example, for bold and underline, you can either set cTypeStyle to kFCAttrBoldStyle + kFCAttrUnderlineStyle.

All attributes cleared first. The settings you include with the PFindTypeAttr1 command replace all existing attribute settings.

Any for cTypeStyle, cPosition, and cCase. Unlike the Type Styles pop-up menu in the Find Attributes dialog box, the any or kFCAttrAny setting for cTypeStyle pertains only to the type styles Bold, Italic, Underline, Strikethru, Outline, Shadow, and Reverse. The value of cTypeStyle does not affect the cPosition and cCase parameters, which are turned off and on separately.

PGetTypeStyle values doubled. If you are using the PGetTypeStyle query in conjunction with PChangeTypeAttr1, PFindTypeAttr1, PGetChangeTypeAttr1, or PGetFindTypeAttr1, note that the PGetTypeStyle query returns different values for the type styles. With the exception of normal, all the PGetTypeStyle values are twice the values used in the find and change commands and queries. For example, bold is 2 for PGetTypeStyle and 1 for PChangeTypeAttr1, PFindTypeAttr1, PGetChangeTypeAttr1, and PGetFindTypeAttr1. Normal, however, is 1 in PGetTypeStyle and 0 in the other commands and queries.

Example. The following example changes all 10-point, bold, underlined text in the current publication to 9-point, Helvetica bold. Notice that it first sets all other Find and Change attributes to Any.

PFindTypeAttr2(kFCAttrAny, kFCAttrAny, "Any", kFCAttrAny);
PChangeTypeAttr2(kFCAttrAny, kFCAttrAny, "Any", kFCAttrAny);
PFindParaAttr("Any", kFCAttrAny, kFCAttrAny);
PChangeParaAttr("Any", kFCAttrAny, kFCAttrAny);
PFindTypeAttr1("Any", 10, kFCAttrAny, kFCAttrBoldStyle + kFCAttrUnderlineStyle, kFCAttrAny, kFCAttrAny);
PChangeTypeAttr1 "Helvetica", 9, kFCAttrAny, kFCAttrBoldStyle, kFCAttrAny, kFCAttrAny);
PChangeAll("", "", kFCSAllStories, false, false, false);


See also

The PChange, PChangeAll, PChangeNext, PChangeParaAttr, PChangeTypeAttr1, PChangeTypeAttr2, PChangeWindow, PFind, PFindNext, PFindParaAttr, PFindTypeAttr2, and PFindWindow commands

The PGetChangeParaAttr, PGetChangeTypeAttr1, PGetChangeTypeAttr2, PGetChangeWindow, PGetFindParaAttr, PGetFindTypeAttr1, PGetFindTypeAttr2, PGetFindWindow, and PGetTypeStyle queries

Adobe PageMaker 6.5 Help > Commands > Utilities > Find


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support