Known Participant
March 21, 2021
Answered
Photoshop CC Javascript to count number of frames in timeline
- March 21, 2021
- 2 replies
- 868 views
I want to find a number of frames on the timeline and move the indicator to read the first frame and so on using javascript. I have tried with the below script which is not working on photoshop cc 2019. I can get only 0 as a number of frames.
var r = new ActionReference();
r.putProperty(charIDToTypeID('Prpr'), stringIDToTypeID('frameCount'));
r.putClass(stringIDToTypeID('timeline'));
var ret = executeActionGet(r);
alert( ret.getInteger(stringIDToTypeID('frameCount')) );
I am attaching the timeline and screenshot and PSD for reference.

Thanks
