Skip to main content
Known Participant
January 28, 2011
Question

FREE Mutliple drop shadow javascript. Enjoy!!

  • January 28, 2011
  • 3 replies
  • 3912 views

var myObject = app.selection[0];

    for(var i=0; i<app.selection.length; i++){

        var myObject = app.selection;

         with(myObject.transparencySettings.dropShadowSettings){

            angle = 135;

            opacity = 33;

            distance = .06;

            mode = ShadowMode.DROP;

            blendMode = BlendMode.NORMAL;

        }

}

Thanks,

http://casey-govero.blogspot.com/

http://caseygovero.com

This topic has been closed for replies.

3 replies

caseyctgAuthor
Known Participant
January 28, 2011

oops! lol.

The only problem I've found with the object styles is that in opening old documents. The style then disappears even if you've created that object style with all docs closed. So going to past documents, the object style disappears. So this still can be useful if editing old docs. 

Great plugin though. I'll be trying that out for sure.

caseyctgAuthor
Known Participant
January 28, 2011

Excellent blog Marjin. You have some great stuff on there.

tomaxxi
Inspiring
January 28, 2011

Thanks

And, by the way, I'm not Marjin... I'm Marijan

Yes, scripting is awesome! Here is another example how to use Object Styles in combination with script to get applied while placing image to document: http://bit.ly/ghMDPX Unfortunately this only work for CS5.

--

tomaxxi

Inspiring
January 28, 2011

I hate to be a bother, but ... how does this differ from selecting multiple objects and then setting the Drop Shadow?

caseyctgAuthor
Known Participant
January 28, 2011

Not a bother. I can see where some people might not see the usefulness of this script.

Well, with this I would consider it a "preset" similar to object styles. You can certainly do this with the drop shadow menu item, but this script allows you to set a preset to reuse time and time again. I guess you could also do this with object styles, but those are relevant to one document, whereas with this you will always have the SAME drop shadow preset in indesign. I've found that I tend to lean towards a certain parameter with my drop shadows. Meaning I always like them at 40% opacity, with a 135 angle. Well rather than configuring this every time I want a drop shadow that looks like this, I can consider this a preset of sorts. Create your shadow style once and reuse it. Otherwise everytime you select a different set of objects, you have to manually set up your drop shadows styling again and again. 40% opacity, at .0625, with a spread of 30%. 

With this you always have the same drop shadow to be used again and again all with one command. Run script. Lets say you have a 200 page catalog, and you want the same  drop shadow on every product. Well with the built in drop shadow menu item, you'd have to set it up the same each and every time....or go through and shift select every item in the document and then run the menu item drop shadow effect. But with this I can set my parameters once, and reuse it in any document, on any page with no reconfiguring.

Make sense??

tomaxxi
Inspiring
January 28, 2011

I think you should consider creating new Object Style without any opened document with exact settings for your drop shadow. I think that would be easier... What will happen if you want to change drop shadow and not having applied through Object Style? Do Find/Replace?

--

tomaxxi

http://indisnip.wordpress.com/

http://inditip.wordpress.com/