I have a script that I'm trying to update from the "Search" command in CS (1)
Here is a simple example of how change the font style of a word in a text frame.. (This works perfectly)
tell application "Adobe InDesign CS3" set find text preferences to nothing set change text preferences to nothing
set find what of find text preferences to "text" set properties of change text preferences to {font style:"Bold"}
tell front document change text of text frame 1 of page 1 end tell
set find text preferences to nothing set change text preferences to nothing end tell
The dictionary says that you can also set fill color.. Although if i try and set the properties to a fill color I get an error..
My problem is, I'm trying to set the fill color to a swatch which is unique to the document I'm trying to apply the change to, if I use "Black" (A standard swatch) it works fine, although if I use "UniqueColor" I get an error
tell application "Adobe InDesign CS3" set find text preferences to nothing set change text preferences to nothing
set find what of find text preferences to "text" set properties of change text preferences to {fill color:swatch "UniqueColor"}
tell front document change text of text frame 1 of page 1 end tell
set find text preferences to nothing set change text preferences to nothing end tell
Help! :-)
Thank in advance.
Wayne |