🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16488

AppleScript: Is it possible to apply drop shadows to importedimages?

#16488
From: Richard R�nnb�ck
Date: Wed, 10 Sep 2003 05:37
63 lines
3523 bytes
This script will let you choose drop shadow style from a list and apply the
chosen style to the items you have selected.  It could be written much
shorter and be made faster, but I think you will find this example quite
easy to follow. Please note that this script refers to name of you swatches,
so you will have to change the line referring to shadow color to reflect the
name of your swatches.



tell application "InDesign 2.0.2"
    activate
    tell active document
        set mySelection to selection
        set myList to {"Shadow Style 1", "Shadow Style 2", "Shadow Style 3"}
        set myShadowStyle to (choose from list myList) as string
        
        if myShadowStyle is "Shadow Style 1" then
            repeat with i in mySelection
                set isolate blending of i to false
                set knockout group of i to false
                set opacity of i to 100.0
                set shadow blend mode of i to multiply
                set shadow color of i to (swatch "Min")
                set shadow mode of i to drop
                set shadow opacity of i to 75.0
                set shadow blur radius of i to 5.0
                set shadow x offset of i to 7.0
                set shadow y offset of i to 7.0
            end repeat
        end if
        
        if myShadowStyle is "Shadow Style 2" then
            repeat with i in mySelection
                set isolate blending of i to false
                set knockout group of i to false
                set opacity of i to 100.0
                set shadow blend mode of i to multiply
                set shadow color of i to (swatch "myStyle")
                set shadow mode of i to drop
                set shadow opacity of i to 75.0
                set shadow blur radius of i to 5.0
                set shadow x offset of i to 7.0
                set shadow y offset of i to 7.0
            end repeat
        end if
        
        if myShadowStyle is "Shadow Style 3" then
            repeat with i in mySelection
                set isolate blending of i to false
                set knockout group of i to false
                set opacity of i to 100.0
                set shadow blend mode of i to multiply
                set shadow color of i to (swatch "3")
                set shadow mode of i to drop
                set shadow opacity of i to 75.0
                set shadow blur radius of i to 5.0
                set shadow x offset of i to 7.0
                set shadow y offset of i to 7.0
            end repeat
        end if
        
    end tell
end tell
Technical Details
Message-ID: <BB84854F.17C23%richard.ronnback@telia.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccd6031.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,3eaf945e0481dc10
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-09-09 23:08:42 PST
From: Richard R�nnb�ck <richard.ronnback@telia.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: AppleScript: Is it possible to apply drop shadows to importedimages?
Message-ID: <BB84854F.17C23%richard.ronnback@telia.com>
Date: Tue, 9 Sep 2003 22:37:51 -0700
References: <2ccd6031.-1@webx.la2eafNXanI>
Lines: 69
User-Agent: Microsoft-Entourage/10.1.4.030702.0
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit