1 person found this helpful
As I understand it unless the script/plug-in has saved the last used setting in customOptions or some type of settings file the only time it will be able to get the last used settings is if it is being called from an action. In that case the settings will be in the app.playbackParameters.
Thank you Michael,
I'll try to see if I can use app.playbackParameters to do what I need.
The result is a string.
I suspect that I need to use executeActionGet(), but I do not understand very well how ActionReference and ActionDescriptor are working and the final code doesn't work.
If finally I'm not able to implement it, I can use a file to interchange the data, but I would prefer not to.
Finally I have found a way to solve it using the descriptor that is returned after executing the plugin.
So if you have something as:
var pluginID = stringIDToTypeID( "2F356668-2FDB-49AA-A861-8203D5AF338C" );
var desc4 = new ActionDescriptor();
var idAmnt = charIDToTypeID( "Amnt" );
var idPrc = charIDToTypeID( "#Prc" );
desc4.putUnitDouble( idAmnt, idPrc, 12.000000 );
var iddisP = charIDToTypeID( "disP" );
var idmooD = charIDToTypeID( "mooD" );
var idmoDone = charIDToTypeID( "moD1" );
desc4.putEnumerated( iddisP, idmooD, idmoDone );
var retDesc = executeAction( pluginID, desc4, DialogModes.NO );
// If some value (e.g: "Amnt") is modified in the plugin, in retDec you have the new value.
// To extract it:
var newValue= retDesc.getDouble(idAmnt);
Thank you again and regards,