Re: Indesig and changing colors
Re: Indesig and changing colors
- Subject: Re: Indesig and changing colors
- From: Stan Cleveland <email@hidden>
- Date: Wed, 07 Oct 2009 16:15:31 -0700
- Thread-topic: Indesig and changing colors
Title: Re: Indesig and changing colors
On 10/7/09 6:04 AM, "Michael Slomski" wrote:
i have to change a certain color to an other color. The search color is the same on each page but the new color will change for every page..
<SNIP>
Any helpful hints?
Hi Michael,
This works relatively quickly and across all pages—including master pages(!)—on my Mac.
tell application "Adobe InDesign CS4"
tell document 1
set searchColor to color "PANTONE 266 C"
set newColor to color "01 KuE 0-70-95-0"
set fill color of text of stories whose fill color is searchColor to newColor
end tell
end tell
To limit color changes to document pages only—leaving master pages untouched—you can use this convoluted bit of logic:
tell application "Adobe InDesign CS4"
tell document 1
set searchColor to color "PANTONE 266 C"
set newColor to color "01 KuE 0-70-95-0"
tell (text of stories whose (fill color is searchColor) and ((class of parent of parent of parent text frames) is not master spread))
set fill color to newColor
end tell
end tell
end tell
Shane’s idea to use find/change may have merit, especially if you’re have documents that contain many pages. But you can test to see if the above code will work in your situation.
HTH,
Stan C.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden