Unfortunately in CS2, the following gives us the 8800 error "The <object unknown> is not currently available"
function runMenuItem(item){ cTID = function(s) { return app.charIDToTypeID(s); } var desc = new ActionDescriptor(); var ref = new ActionReference(); ref.putEnumerated( cTID( "Mn " ), cTID( "MnIt" ), cTID( item ) ); desc.putReference( cTID( "null" ), ref ); executeAction( cTID( "slct" ), desc, DialogModes.NO ); }
runMenuItem("snap")
even though
runMenuItem("ActP"); //actual size 100%works fine.