I trying to create a 360 degree animation from In Design-to-HTML conversion.
I get the folder name, and inside that folder are 50 to 80 images. I need to save those images in my folder, and to save each image name inside the script.
Here's my code:
var doc = app.activeDocument;
for (var j =0; j< doc.rectangles.length; j++) {
var nav = doc.rectangles[j].extractLabel("",);
alert("Nav length "+nav.length);
for(var nav_get_name =0; nav_get_name < nav.length; nav_get_name++) {
alert(nav[nav_get_name][0]+"="+nav[nav_get_name][1]);
var path_name = (nav[2][1]);
}
}
It looks like you'll want to call the place method.
Putting something like this in your innermost for loop should work provided inDesign allows multiple items to be attached to the same rectangle.
doc.rectangles[j].place(path_name);
If you're running on Windows, you'll want to run this regex first to escape the backslashes in the path (if they aren't already).
path_name.replace(/\\/g, "\\\\\\");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With