apple script to mimic object > artboards > convert to artboards

New Here ,
Jun 21, 2022 Jun 21, 2022

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!

TOPICS
Scripting

Views

57

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jun 22, 2022 Jun 22, 2022
Can also be done by: execute menu command menu command string "setCropMarks"

Likes

Translate

Translate
Adobe Community Professional ,
Jun 21, 2022 Jun 21, 2022

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

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 22, 2022 Jun 22, 2022

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

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 22, 2022 Jun 22, 2022

Copy link to clipboard

Copied

Can also be done by:

 

execute menu command menu command string "setCropMarks"

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 22, 2022 Jun 22, 2022

Copy link to clipboard

Copied

LATEST

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines