Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Script for saving GIF with Animation Loop Endless

$
0
0

When you do use "save for web" and select GIF, on the bottom right, the loop mode can be selected. But i think i wouldn't matter to me if it's being set before saving the image.

 

I already tried to run the script, but somehow

 

"charIDToTID('Ordn')" for example won't run. Is this the same as charIDToTypeID? because i found charIDToTypeID is a function, but charIDToTID is not...

 

also the third line from the end, one of the functions seem not to work, i think....

 

 

But already you given me a real good answer to what i may try to search for, since i did not actually know that this is set within the timeline, i always used the option within the "save for web" dialog on the bottom-right.

 

I Solved my own problem ...

 

I just made Photoshop CC with a script log everything, then gotten to this:

 

function setLoopForever() {

var idsetd = charIDToTypeID( "setd" );

    var desc5 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref2 = new ActionReference();

        var idanimationClass = stringIDToTypeID( "animationClass" );

        var idOrdn = charIDToTypeID( "Ordn" );

        var idTrgt = charIDToTypeID( "Trgt" );

        ref2.putEnumerated( idanimationClass, idOrdn, idTrgt );

    desc5.putReference( idnull, ref2 );

    var idT = charIDToTypeID( "T   " );

        var desc6 = new ActionDescriptor();

        var idanimationLoopEnum = stringIDToTypeID( "animationLoopEnum" );

        var idanimationLoopType = stringIDToTypeID( "animationLoopType" );

        var idanimationLoopForever = stringIDToTypeID( "animationLoopForever" );

        desc6.putEnumerated( idanimationLoopEnum, idanimationLoopType, idanimationLoopForever );

    var idanimationClass = stringIDToTypeID( "animationClass" );

    desc5.putObject( idT, idanimationClass, desc6 );

executeAction( idsetd, desc5, DialogModes.NO );

}

 

Works perfect!


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>