Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Create Frame Animation via JSX script

New Here ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

I'd like to be able to add frame animation to an open PSD file and manipulate it from there. Looking at the ScriptingListener log, I can see that clicking Create Frame Animation in the Timeline window in Photoshop does something like this:

var idhistoryStateChanged = stringIDToTypeID( "historyStateChanged" );
    var desc262 = new ActionDescriptor();
    var iddocumentID = stringIDToTypeID( "documentID" );
    desc262.putInteger( iddocumentID, 249 );
    var idID = stringIDToTypeID( "ID" );
    desc262.putInteger( idID, 253 );
    var idname = stringIDToTypeID( "name" );
    desc262.putString( idname, """Create Frame Animation""" );
    var idhasEnglish = stringIDToTypeID( "hasEnglish" );
    desc262.putBoolean( idhasEnglish, true );
    var iditemIndex = stringIDToTypeID( "itemIndex" );
    desc262.putInteger( iditemIndex, 2 );
executeAction( idhistoryStateChanged, desc262, DialogModes.NO );

The issue is that I have no idea how to find the "documentID" and "ID" I need here to make this general purpose.

Does anyone know how to find these two bits of information?

Thanks.

TOPICS
Actions and scripting

Views

36

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Oct 26, 2021 Oct 26, 2021
try using only this executeAction(stringIDToTypeID("makeFrameAnimation"), undefined, DialogModes.NO);

Likes

Translate

Translate
Adobe Community Professional ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

try using only this

 

executeAction(stringIDToTypeID("makeFrameAnimation"), undefined, DialogModes.NO);

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

LATEST

Ah, thank you! I saw that in the log after all of the above mess, but assumed the above was required first. But I guess that's all just managing the history to keep things un-doable.

Thank you again for the help!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines