(JS) Duplicate a graphics frame?
Copy link to clipboard
Copied
After reading a lot of help files I git as far as figuring out how to duplicate a selected text frame.
if (app.selection[0].constructor.name == "TextFrame"){
myFrame = app.selection[0];
myDupeFrame = myFrame.duplicate();
}
If I change the "TextFrame" to "Objectframe" or "GraphicFrame" or "ImageFrame" it doesn't work. Is there a place where I can find out what things are called?
Thanks,
Randy
Copy link to clipboard
Copied
Thanks very much Kasyan that's great, it doesn't seem to selecting the photoshop clipping path though.
If I select the path manually, comment out //myClippingPathSettings.clippingType = ClippingPathType.PHOTOSHOP_PATH; and then run the script it does all the other bits brilliantly
Any ideas?
Thanks again
Paul
Copy link to clipboard
Copied
I made this script for CS3 -- you didn't mention that you need it for CS2 at first. I'll try to check it in CS2, if I have time, but don't promise.
Copy link to clipboard
Copied
No problem, thanks for your time, its much appreciated
Copy link to clipboard
Copied
Just looking at this some more and it seems that it has chosen the path, but not actually applied it (very strange), so if you go into clipping paths and click the preview button off and then on again it will work.
Copy link to clipboard
Copied
I now remember that InDesign CS2's scripting is broken with respect to clipping paths. I found a workaround back in CS2 days, but it was so long ago that I can't recollect how I did it. Another problem is that the only copy of CS2 I have in my disposal is broken: I can't debug scripts in ESTK, I am able only to run them.
Copy link to clipboard
Copied
I wonder if a tiny inset frame measurement (0.01mm) would force it to apply?
Copy link to clipboard
Copied
No, I tried and it didn't help. Time to upgrade!
Copy link to clipboard
Copied
Can't do that unfortunately.
Thanks very much for you help on this, maybe I'll find some bodge to make it work.
cheers


-
- 1
- 2