Participant
March 28, 2024
Answered
Writing a script to select the next artboard.
- March 28, 2024
- 1 reply
- 520 views
I need to write a script that simply selects the next artboard.
I have tried a few scripts along the lines of: "var doc = app.activeDocument;
var artboards = doc.artboards;
var activeArtboard = doc.activeArtboard;
var nextArtboardIndex = activeArtboard.index + 1;
if (nextArtboardIndex < artboards.length) {
artboards[nextArtboardIndex].activate();
} else {
artboards[0].activate();
}"
But I get an Error 21: undefined is not an object.
Line: 4 -> var nextArtboarIndex = activeArtboard.index + 1;
Any help to correct this or if anyone can write a better script?
Much thanks in advance!
