Skip to main content
Inspiring
July 9, 2026
Question

Disposal method for exportforweb animated gif

  • July 9, 2026
  • 2 replies
  • 12 views

Pop quiz, hot shot!

Anyone know how to change the disposal method in Stephen Marsh’s most excellent save for web script

  my best effort was 

  var idLeave = charIDToTypeID( "Lve " ); // For "Leave" disposal method
desc189.putEnumerated( idTDth, idIRDt, idLeave );

Which saves, but doesn’t seem to change the disposal method to no removal method for all frames (might be global) 

 

As always answers on a postcard.

 

    2 replies

    Stephen Marsh
    Community Expert
    Community Expert
    July 10, 2026

    This is set in the timeline…

     

    var idsetd = charIDToTypeID( "setd" );
    var desc44 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref6 = new ActionReference();
    var idanimationFrameClass = stringIDToTypeID( "animationFrameClass" );
    var idOrdn = charIDToTypeID( "Ordn" );
    var idTrgt = charIDToTypeID( "Trgt" );
    ref6.putEnumerated( idanimationFrameClass, idOrdn, idTrgt );
    desc44.putReference( idnull, ref6 );
    var idT = charIDToTypeID( "T " );
    var desc45 = new ActionDescriptor();
    var idanimationFrameReplace = stringIDToTypeID( "animationFrameReplace" );
    var idanimationFrameReplaceType = stringIDToTypeID( "animationFrameReplaceType" );
    var idanimationFrameReplaceDontDispose = stringIDToTypeID( "animationFrameReplaceDontDispose" );
    desc45.putEnumerated( idanimationFrameReplace, idanimationFrameReplaceType, idanimationFrameReplaceDontDispose );
    var idanimationFrameClass = stringIDToTypeID( "animationFrameClass" );
    desc44.putObject( idT, idanimationFrameClass, desc45 );
    executeAction( idsetd, desc44, DialogModes.NO );

     

    var idsetd = charIDToTypeID( "setd" );
    var desc51 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
    var ref7 = new ActionReference();
    var idanimationFrameClass = stringIDToTypeID( "animationFrameClass" );
    var idOrdn = charIDToTypeID( "Ordn" );
    var idTrgt = charIDToTypeID( "Trgt" );
    ref7.putEnumerated( idanimationFrameClass, idOrdn, idTrgt );
    desc51.putReference( idnull, ref7 );
    var idT = charIDToTypeID( "T " );
    var desc52 = new ActionDescriptor();
    var idanimationFrameReplace = stringIDToTypeID( "animationFrameReplace" );
    var idanimationFrameReplaceType = stringIDToTypeID( "animationFrameReplaceType" );
    var idanimationFrameReplaceDispose = stringIDToTypeID( "animationFrameReplaceDispose" );
    desc52.putEnumerated( idanimationFrameReplace, idanimationFrameReplaceType, idanimationFrameReplaceDispose );
    var idanimationFrameClass = stringIDToTypeID( "animationFrameClass" );
    desc51.putObject( idT, idanimationFrameClass, desc52 );
    executeAction( idsetd, desc51, DialogModes.NO );

     

    c.pfaffenbichler
    Community Expert
    Community Expert
    July 9, 2026

    Calling ​@Stephen Marsh ! 

    Stephen Marsh
    Community Expert
    Community Expert
    July 10, 2026

    Thanks for the shout-out, I missed this!