var artsLen = activeDocument.artboards.length,
actArt = activeDocument.artboards.getActiveArtboardIndex ();
if ( actArt + 1 == artsLen ) {
activeDocument.artboards.setActiveArtboardIndex ( 0 ); // на первый
} else if ( actArt + 1 < artsLen ) {
activeDocument.artboards.setActiveArtboardIndex ( actArt + 1 ); // на следующий
}