Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
var myImage = myFrame.images[0];
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello
I am brand new to scripting and therefore I am scripting muppet!
I want to do something similar to this but my pathetic attempts at hacking away at the code here are going nowhere.
I basically want to:
1. apply a photoshop path to a selected image (there would only ever be one path but the name could be anything)
2. Duplicate the image (I can do this bit)
3. "convert clipping path to frame" on the selected frame
4. remove the image but retain the frame
5. put a 2mm text wrap on the object shape
Copy link to clipboard
Copied
Sent it before I finished typing! Scripting, I can't even use the bloody internet today!
If anyone can help on any of these steps I'd really appreciate it
cheers
Paul "scripting muppet"
Copy link to clipboard
Copied
if (app.selection.length != 1 || app.selection[0].images.length != 1) {
alert("One frame with an image should be selected");
exit();
}
var mySel = app.selection[0];
var myImage = mySel.images[0];
var myClippingPathSettings = myImage.clippingPath;
myClippingPathSettings.clippingType = ClippingPathType.PHOTOSHOP_PATH;
var myDuplicate = mySel.duplicate();
var myNewFrame = myDuplicate.images[0].clippingPath.convertToFrame();
myNewFrame.images[0].remove();
var myTextWrapPreferences = myNewFrame.textWrapPreferences;
myTextWrapPreferences.textWrapType = TextWrapTypes.CONTOUR;
myTextWrapPreferences.textWrapOffset = "2 mm";
myNewFrame.select();
alert("Done");
Find more inspiration, events, and resources on the new Adobe Community
Explore Now