Copy link to clipboard
Copied
Hi, this is my first time posting. I have been creating atomations with applescript and then running them via automator for my work flows, that has been going well. but I ran into an issue whre I need to convert shapes to artboards. I know I can do it with object > artboards > convert to artboards in the nav. Is this possilbe to do with apple script? Thanks!
Copy link to clipboard
Copied
this is javascript, there should be an equivalent in applescript or perhaps applescript can execute javascript? vbscript on windows can.
// convert selected rectangles to Artboards
app.executeMenuCommand ("setCropMarks");
Copy link to clipboard
Copied
As Carlos points out can be done with JS in Applescript by:
tell application id "com.adobe.illustrator"
set theJS to "app.executeMenuCommand ('setCropMarks');"
set runjava to do javascript theJS
end tell
Copy link to clipboard
Copied
Can also be done by:
execute menu command menu command string "setCropMarks"
Copy link to clipboard
Copied
thank you, a minor adjustment and it worked!
tell application "Adobe Illustrator"
set theJS to "app.executeMenuCommand ('setCropMarks');"
set runjava to do javascript theJS
end tell