var strPlugInsFolderDirectory = localize( "$$$/LocalizedFilenames.xml/SourceDirectoryName/id/Extras/[LOCALE]/[LOCALE]_Plug-ins/value=Plug-ins" ); var actionFile = File(app.path.toString() + "/" + strPlugInsFolderDirectory + "/Panels/PanosFX/content/The%20BnBig%20picture.atn" ); var actionSet = "The BnBig picture"; var action = "THE ACTION"; var actionLoaded = false; cTID = function( s ) { return app.charIDToTypeID( s ); }; getActionSets = function() { var i = 1; var sets = [ ]; while ( true ) { var ref = new ActionReference(); ref.putIndex( cTID( "ASet" ), i ); var desc; var lvl = $.level; $.level = 0; try { desc = executeActionGet( ref ); } catch ( e ) { break; } finally { $.level = lvl; } if ( desc.hasKey( cTID( "Nm " ) ) ) { var set = { }; set.index = i; set.name = desc.getString( cTID( "Nm " ) ); set.toString = function( ) { return this.name; }; set.count = desc.getInteger( cTID( "NmbC" ) ); set.actions = [ ]; for ( var j = 1; j <= set.count; j++ ) { var ref = new ActionReference( ); ref.putIndex( cTID( 'Actn' ), j ); ref.putIndex( cTID( 'ASet' ), set.index ); var adesc = executeActionGet( ref ); var actName = adesc.getString( cTID( 'Nm ' ) ); set.actions.push( actName ); } sets.push( set ); } i++; } return sets; }; var sets = getActionSets( ); for (i=0; i