Copy link to clipboard
Copied
What docs/guides do you go-to when you are scripting in Illustrator?
Here's mine:
Of course, there's ExtendScript Toolkit app which has the "data browser" for when you're connected to Illustrator. And, if you go to the Help menu, you can open the "Object Model Viewer" (which, has never really been very usable/useful IMHO).
What resources/docs/other do you have bookmarked?
Copy link to clipboard
Copied
Here are some additional essentials:
executeMenuCommands reference:
live Effect XML guide
PageItem.applyEffect(LiveEffectXML)
XMP reference snippet:
Copy link to clipboard
Copied
I often use to check objects and properties something like below code:
var targetObject = prompt ('define object', 'app.activeDocument.selection[0]');
if (targetObject){
eval('obj=' + targetObject);
var result = "";
for (var a in obj){
try{
result += a + " : " + obj + "\r";
for (var b in obj){
result += a + "." + b + " : " + obj + "\r";
}
} catch (e) {
result += a + " : NA.\r";
}
}
var w = new Window ("dialog", 'properties');
var txbx = w.add ("edittext", undefined, result, {multiline: true, scrolling: true});
txbx.maximumSize.height = w.maximumSize.height - 200;
txbx.minimumSize.width = 480;
txbx.minimumSize.height = 300;
var cl = w.add ("button", undefined, "close", {name: "ok"});
cl.onClick= function(){w.close();}
w.show ();
}
Select object in Illustrator and run it. You will get objects properties and values.
Probably, It helps your research work.
Copy link to clipboard
Copied
Awesome! Thanks Silly-Vā and Ten Aā! Great tips and linkages!
Here's one I forgot to post:
ScriptUI AutoLayout Manager Algorithm (PDF)
I've also resorted to a global Adobe forums search if the Illustrator-specific search doesn't pan out. Sometimes people have solved the same problems in other Adobe apps (most of the time, from what I have experienced, the code posted is directly translatable into Illy).
Lastly, here's a filter for the tag "illustrator-scripting" on Graphic Design Stack Exchange. Does not seem as active as this forum though.
Copy link to clipboard
Copied