Skip to main content
Participant
June 21, 2022
Answered

apple script to mimic object > artboards > convert to artboards

  • June 21, 2022
  • 2 replies
  • 420 views

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!

This topic has been closed for replies.
Correct answer mcs_dean

Can also be done by:

 

execute menu command menu command string "setCropMarks"

 

2 replies

mcs_deanCorrect answer
Inspiring
June 22, 2022

Can also be done by:

 

execute menu command menu command string "setCropMarks"

 

Participant
June 22, 2022

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
CarlosCanto
Community Expert
Community Expert
June 22, 2022

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");

 

Inspiring
June 22, 2022

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