Copy link to clipboard
Copied
Here u can see 4 art boards on attached screenshot, but i want to delete 1,3,4 art boards
i like to work with art board 2
1 Correct answer
just wrap Alexander's script in a do javascript to incorporate it into your applescript workflow.
tell application "Adobe Illustrator"
do javascript " function removeArtboards ( arr ) {
var i = arr.length; while ( i-- ) activeDocument.artboards[ arr[i] ].remove();
}
removeArtboards( [0,2,3] ); "
end tell
Explore related tutorials & articles
Copy link to clipboard
Copied
As an option:
function removeArtboards ( arr ) {
var i = arr.length; while ( i-- ) activeDocument.artboards[ arr[i] ].remove();
}
removeArtboards( [0,2,3] );
Copy link to clipboard
Copied
Its work good,
how to convert this in Applescript
Copy link to clipboard
Copied
Unfortunately I do not write on applescript.
Copy link to clipboard
Copied
karthickm50893796 schrieb:
… how to convert this in Applescript
You can use Javascript under MacOS too. It is not necessary to rewrite all Javascripts in Applescript. And the most people here „speaking“ Javascript.
Copy link to clipboard
Copied
just wrap Alexander's script in a do javascript to incorporate it into your applescript workflow.
tell application "Adobe Illustrator"
do javascript " function removeArtboards ( arr ) {
var i = arr.length; while ( i-- ) activeDocument.artboards[ arr[i] ].remove();
}
removeArtboards( [0,2,3] ); "
end tell
Copy link to clipboard
Copied
can you update the jsx script it dosen't work for me
Copy link to clipboard
Copied
try copying the script again, I just fixed the missing indexes
Copy link to clipboard
Copied
Thank you

