• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

241

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

People's Champ , Oct 26, 2021 Oct 26, 2021

try using only this

 

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

 

Votes

Translate

Translate
Adobe
People's Champ ,
Oct 26, 2021 Oct 26, 2021

Copy link to clipboard

Copied

try using only this

 

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

 

Votes

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!

Votes

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