How to open composition in viewer in Adobe After Effects using scripts

// Make a composition var comp = app.project.items.addComp(‘MyComp’, 1920, 1080, 1.0, 10, 25.0 ); // Open it in viewer comp.openInViewer(); This solution works only in AAE CS 6.0 My version of some cross-platform code function OpenInViewer( comp ) { var version = app.version.match(/(\d+.\d+)./)[1]; if( version >= 11.0 ) comp.openInViewer() ; else { var duration = comp.workAreaDuration; comp.workAreaDuration = 2comp.frameDuration; comp.ramPreviewTest("",1,""); comp.workAreaDuration = duration; } } inspired by [http://www.videocopilot.net/forum/viewtopic.php?f=5&t=116057#p348646](http://www.videocopilot.net/forum/viewtopic.php?f=5&t=116057#p348646)

October 24, 2013 · SergeM