Actions and scripts do not use presets correctly and instead seem to fall back on "-last-used-". I'm trying to automate saving a set of 3 textures without having to go through prompts. The order it should save in is:
Not sure whether this is a fault within the plugin, feel free to close the issue if Photoshop itself is causing this.
var idsave = charIDToTypeID( "save" );
var desc18 = new ActionDescriptor();
var idAs = charIDToTypeID( "As " );
var desc19 = new ActionDescriptor();
var idpres = charIDToTypeID( "pres" );
desc19.putString( idpres, """DDSExport_d""");
var idIntelDDS = stringIDToTypeID( "Intel® Texture Works Intel® Texture Works" );
desc18.putObject( idAs, idIntelDDS, desc19 );
var idIn = charIDToTypeID( "In " );
desc18.putPath( idIn, new File( activeDocument.path + "\\DDSExport_d.DDS") );
var idDocI = charIDToTypeID( "DocI" );
desc18.putInteger( idDocI, 195 );
var idCpy = charIDToTypeID( "Cpy " );
desc18.putBoolean( idCpy, true );
var idLyrs = charIDToTypeID( "Lyrs" );
desc18.putBoolean( idLyrs, false );
var idsaveStage = stringIDToTypeID( "saveStage" );
var idsaveStageType = stringIDToTypeID( "saveStageType" );
var idsaveSucceeded = stringIDToTypeID( "saveSucceeded" );
desc18.putEnumerated( idsaveStage, idsaveStageType, idsaveSucceeded );
executeAction( idsave, desc18, DialogModes.NO );