Find object

There are several ways to specify a Find object, depending on what you want to find and replace. Use the whatToFind property to specify the type of find operation, along with the properties that are associated with each legal value for whatToFind. These properties are listed in the following tables. Read-only properties are marked with a bullet (•).

Finding and replacing text

Property Data type Notes

whatToFind

string

In the format: "text"

find

string

Text to find.

matchCase

Boolean

If set to true, the search is case-sensitive. Defaults to false.

regExp

Boolean

If set to true, the find and replace text is interpreted as a regular expression. The default is false.

replace

string

Text to use as replacement text.

wholeWord

Boolean

If set to true, only whole words matching the search text are found. The default is false.

Finding and replacing fonts and styles

Property Data type Notes

whatToFind

string

In the format: "font"

find

string

Name of font to find.

replace

string

Name of font to use as replacement.

findStyle

integer

Number that represents the style to find:

AnyStyle = -1

Plain = 0

Bold = 1

Italic = 2

BoldItalic = 3

Underline = 4

BoldUnderline = 5

ItalicUnderline = 6

BoldItalicUnderline = 7

replaceStyle

integer

Number that represents the style to be used as replacement.

findMinSize

integer

0 to 9999

findMaxSize

integer

0 to 9999

replaceSize

integer

0 to 9999, or pass -1 to leave size as is

Finding and replacing colors, fills, strokes, and effects

Property Data type Notes

whatToFind

string

In the format: "color"

find

string

A color string that specifies the color to find (for more information, see Color string data type).

replace

string

A color string that specifies the color to use as a replacement (for more information, see Color string data type).

fills

Boolean

If set to true, fills that match the specified colors are replaced.

strokes

Boolean

If set to true, strokes that match the specified colors are replaced.

effects

Boolean

If set to true, effects that match the specified colors are replaced.

Finding and replacing URLs

Property Data types Notes

whatToFind

string

In the format: "url"

find

string

URL to find, which is expressed as file://URL.

replace

string

URL to use as replacement text, which is expressed as file://URL.

wholeWord

Boolean

If set to true, only whole words that match the search text are found. The default is false.

matchCase

Boolean

If set to true, the search is case sensitive. Defaults to false.

regExp

Boolean

If set to true, the find and replace text is interpreted as a regular expression. The default value is false.

Finding and replacing non-websafe colors with the closest websafe color

Property Data type Notes

whatToFind

string

In the format: "nonwebcolor"

effects

Boolean

If set to true, colors in effects are replaced. The default value is false.

fills

Boolean

If set to true, colors in fills are replaced. The default value is false.

strokes

Boolean

If set to true, colors in strokes are replaced. The default value is false.


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_02_20.htm