Copy link to clipboard
Copied
Hi!
I need some help with script...after i select some pictures instead of pressing SHIFT + ESC and applying effect manually with mouse i want script to do it automaticlly.
if someone have some guide or links i will be very grateful.
EDIT: maybe i didn't explain good enough, so after place some image in indesign i want that the script , create "Graphic Effect" (Transparency > Mode > Multiply) - as is in the video
https://docs.google.com/file/d/0Bzq39-uGEZVhTkt0Ml85Tm12M1U/edit?usp=sharing
EDIT2:
var myDoc = app.select(app.activeWindow.activePage.allGraphics);
myDoc.contentTransparencySettings.blendingSettings.FindChangeBlendingSetting.BlendMode.multiply;
i get the error "undefined is not an object"
Copy link to clipboard
Copied
Hi.
try code below.
I think it is unnecessary to select the objects
var graphics = app.activeWindow.activePage.allGraphics;
app.select(graphics); //=> undefined. because select method return undefined
// apply filter to each graphic
var i = graphics.length;
while (i--) {
graphics.transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
};
thank you
mg.
Copy link to clipboard
Copied
thnx it's working i have just one question
var i = graphics.length;
lenght is how much objects is selected? thna you itereated every graphic object ?
Copy link to clipboard
Copied
Yes every graphic. (=.allGraphics)
if you want to apply only selected object
for example
var sel = app.selection; // graphic container;
var i = sel.length;
while (i--) {
try {
sel.graphics[0].transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
}
catch(e){}
};
thank you
mg.
Copy link to clipboard
Copied
selecting all (instead CTRL + A)
app.select(app.activeWindow.activePage.allPageItems);
after i run this in editor, i get selected rectengules (frames) and graphics, how to select just rectengules i whont to apply tham an object style or maybe it's better to say, all frames that have graphic in themselves.