Basicly, I'm trying somehow to get this:
[img] [/img]
I've tried everything I could think of but no luck. Currently I'm trying to pull of the data using executeActionGet() function but I think I'm not constructing the action descriptors and references well... not shure how they actually works.
Get timeline frame number?
Re: Get timeline frame number?
Bonjour
Do you do this in javascript or do you use the ScriptlisteneJS.log?
Can you show the code used and the data you want?

Do you do this in javascript or do you use the ScriptlisteneJS.log?
Can you show the code used and the data you want?

- Jaroslav Bereza
- Posts: 38
- Joined: Tue Dec 27, 2016 7:22 pm
Re: Get timeline frame number?
Code: Select all
var ref = new ActionReference();
ref.putProperty(stringIDToTypeID('property'), stringIDToTypeID('time'));
ref.putClass(stringIDToTypeID('timeline'), stringIDToTypeID('timeline'));
var desc = executeActionGet(ref); // <- it's here inside desc
Code: Select all
var time_Seconds = desc.getObjectValue(stringIDToTypeID('time')).getInteger(stringIDToTypeID('seconds'))
var time_Frame = desc.getObjectValue(stringIDToTypeID('time')).getInteger(stringIDToTypeID('frame'))
var time_FrameRate = desc.getObjectValue(stringIDToTypeID('time')).getDouble(stringIDToTypeID('frameRate'))
Re: Get timeline frame number?
@Jaroslav Bereza
Could you perhaps explain how to use this?
I see comparisons to code from scriptlistner. I tried using your version but keeps telling me "this command is not available"
This is code extracted from scriptlistner. I see parts which match, kindof.
Really wish Adobe opened Pandora's box on timeline scripting. Ive read so many posts now, even posts from internal Adobe people stating its BLACK MAGIC. Lots of code is so old never touched and no one seems to know how it works?!
Could you perhaps explain how to use this?
I see comparisons to code from scriptlistner. I tried using your version but keeps telling me "this command is not available"
This is code extracted from scriptlistner. I see parts which match, kindof.
Code: Select all
// Move playhead 1 second
var idsetd = charIDToTypeID( "setd" );
var desc36 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref18 = new ActionReference();
var idPrpr = charIDToTypeID( "Prpr" );
var idtime = stringIDToTypeID( "time" );
ref18.putProperty( idPrpr, idtime );
var idtimeline = stringIDToTypeID( "timeline" );
ref18.putClass( idtimeline );
desc36.putReference( idnull, ref18 );
var idT = charIDToTypeID( "T " );
var desc37 = new ActionDescriptor();
var idseconds = stringIDToTypeID( "seconds" );
desc37.putInteger( idseconds, 0 );
var idframe = stringIDToTypeID( "frame" );
desc37.putInteger( idframe, +1 );
var idframeRate = stringIDToTypeID( "frameRate" );
desc37.putDouble( idframeRate, 24.000000 );
var idtimecode = stringIDToTypeID( "timecode" );
desc36.putObject( idT, idtimecode, desc37 );
executeAction( idsetd, desc36, DialogModes.NO );
Re: Get timeline frame number?
Sorry nevermind me... I should have checked the code better and re-read it. I thought this was executing commands and putting timeline at a certain point.
This is super great!!!!
How did you find this?
This is super great!!!!
How did you find this?