On 04/10/2007, at 5:44 AM, Wayne Melrose wrote:
On 04/10/2007, at 3:30 AM, Shane Stanley wrote: set properties of change text preferences to {fill color:swatch "UniqueColor"}
In cases like this, and generally in InDesign, it's better to use references:
set myColor to swatch "UniqueColor" of document 1 set properties of change text preferences to {fill color:myColor}
Thanks for the reply Shane, it was a little late when I posted that, I forgot to mention that I had tried that, and this is the error I got..
Adobe InDesign CS3 got an error: Request failed because object is from a different document or workspace.
I think I solved my own problem with this..
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"
tell text frame 1 of document 1 set lstFoundItems to find text repeat with propCurrentCharacter in lstFoundItems set fill color of propCurrentCharacter to "UniqueColor" end repeat end tell
set find text preferences to nothing set change text preferences to nothing end tell
Although I am a little confused as to why the dictionary lists a whole bunch of document properties, including Character and Paragraph styles (which work fine and are unique to a document) although a swatch that is defined by the user errors..
|