RE: InDesign CS5.1 object styles
RE: InDesign CS5.1 object styles
- Subject: RE: InDesign CS5.1 object styles
- From: Rick Gordon <email@hidden>
- Date: Fri, 06 Apr 2012 16:54:29 -0700
See if some of the code below helps:
----------
property pLiveLayerName : "FLO_LIVE_TEXT"
property pImageLayerName : "User Graphics Layer"
set vTextFrameList to {}
set vResultList to {}
tell application "Adobe InDesign CS5.5"
set vApp to it
tell active document
set vDoc to it
set vLiveTextLayer to layer pLiveLayerName
set vImageLayer to layer pImageLayerName
set vNoneSwatch to swatch "None"
set vTextFrameList to items of (all page items of vLiveTextLayer) where (class is text frame)
--set vTextFrameList to items of (selection as list)
repeat with vEachItem in vTextFrameList
tell vEachItem
set vTransparency to transparency settings
set vContentTransparency to content transparency settings
set vFillTransparency to fill transparency settings
set vStrokeTransparency to stroke transparency settings
set vNoTransparency to true
set vResetList to {}
tell vTransparency
if (opacity of blending settings 100.0) or (blend mode of blending settings is not normal) or (mode of drop shadow settings is not none) or (mode of feather settings is not none) or (applied of inner shadow settings is true) or (applied of outer glow settings is true) and (applied of inner glow settings is true) or (applied of bevel and emboss settings is true) or (applied of satin settings is true) or (applied of directional feather settings is true) or (applied of gradient feather settings is true) then
set vNoTransparency to false
set end of vResetList to vTransparency
end if
end tell --vTransparency
tell vContentTransparency
if (opacity of blending settings 100.0) or (blend mode of blending settings is not normal) or (mode of drop shadow settings is not none) or (mode of feather settings is not none) or (applied of inner shadow settings is true) or (applied of outer glow settings is true) and (applied of inner glow settings is true) or (applied of bevel and emboss settings is true) or (applied of satin settings is true) or (applied of directional feather settings is true) or (applied of gradient feather settings is true) then
set vNoTransparency to false
set end of vResetList to vContentTransparency
end if
end tell --vContentTransparency
tell vFillTransparency
if (opacity of blending settings 100.0) or (blend mode of blending settings is not normal) or (mode of drop shadow settings is not none) or (mode of feather settings is not none) or (applied of inner shadow settings is true) or (applied of outer glow settings is true) and (applied of inner glow settings is true) or (applied of bevel and emboss settings is true) or (applied of satin settings is true) or (applied of directional feather settings is true) or (applied of gradient feather settings is true) then
set vNoTransparency to false
set end of vResetList to vFillTransparency
end if
end tell --vFillTransparency
tell vStrokeTransparency
if (opacity of blending settings 100.0) or (blend mode of blending settings is not normal) or (mode of drop shadow settings is not none) or (mode of feather settings is not none) or (applied of inner shadow settings is true) or (applied of outer glow settings is true) and (applied of inner glow settings is true) or (applied of bevel and emboss settings is true) or (applied of satin settings is true) or (applied of directional feather settings is true) or (applied of gradient feather settings is true) then
set vNoTransparency to false
set end of vResetList to vStrokeTransparency
end if
end tell --vStrokeTransparency
if vNoTransparency is false then
set vCurrentPage to parent page
set end of vResultList to name of vCurrentPage
copy properties to vProperties
set vGraphicsFrame to duplicate it
set contents of parent story of vGraphicsFrame to ""
set properties of vGraphicsFrame to {item layer:vImageLayer, content type:unassigned}
set properties to {fill color:vNoneSwatch, stroke color:vNoneSwatch}
repeat with vItem in vResetList
tell vItem
if properties of blending settings is not {opacity:100.0, blend mode:normal} then set ¬
properties of blending settings to {opacity:100.0, blend mode:normal}
if mode of drop shadow settings is not none then set ¬
mode of drop shadow settings to none
if mode of feather settings is not none then set ¬
mode of feather settings to none
if applied of inner shadow settings is not false then set ¬
applied of inner shadow settings to false
if applied of outer glow settings is not false then set ¬
applied of outer glow settings to false
if applied of inner glow settings is not false then set ¬
applied of inner glow settings to false
if applied of bevel and emboss settings is not false then set ¬
applied of bevel and emboss settings to false
if applied of satin settings is not false then set ¬
applied of satin settings to false
if applied of directional feather settings is not false then set ¬
applied of directional feather settings to false
if applied of gradient feather settings is not false then set ¬
applied of gradient feather settings to false
end tell
end repeat
end if -- if vNoTransparency is false
end tell
end repeat
--return vResultList
end tell
end tell
------------------
On 4/2/12 at 6:33 PM -0400, Houston, Brad wrote in a message entitled
"InDesign CS5.1 object styles":
>Greetings wise ones,
>
>Stuck and going around in circles. Hopefully someone knows where the exit
>is.
>
>Trying to set up object styles (in InDesign CS5.1) via applescript and can't
>figure out how to enable, and consequently set properties for, object
>effects; such as a drop shadow. Everything I try results in either the
>ubiquitous "Can't set . . ." or else nothing happens (executes without
>apparent effect). When nothing seems to happen but I then query, via
>applescript, for the property value, it's changed. But where?
>
>Any suggestions would be appreciated.
>
>Brad
>
>
>The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer. The McGraw-Hill Companies, Inc. reserves the right, subject to applicable local law, to monitor, review and process the content of any electronic message or information sent to or from McGraw-Hill e-mail addresses without informing the sender or recipient of the message. By sending electronic message or information to McGraw-Hill e-mail addresses you, as the sender, are consenting to McGraw-Hill processing any of your personal data therein.
>
> _______________________________________________
>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
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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