-
ExtendedScript – Update Layer Marker
I’m trying to to a marker update using extendedScript (Layer->Marker->’Update Marker from Source’). But to do this the layer on which this needs to be done needs to active. In my case it’s an audio layer.
Here is what I have done so far with some help from the this link: https://forums.creativecow.net/thread/227/43715
Now the problem here is the code only works if the item (or composition) is opened. If the project is loaded but the item/composition is closed the above code doesn’t work. If I open the item/composition manually and execute the above code works fine. The question now is how do I open the item/composition from the loaded project.
var bodyComp = app.project.items[13]; //MyComposition on the project which relates to item 13
var test= bodyComp.layers[8]; // my layer (audio in my case)test.selected = true; //select the audio layer
app.executeCommand(2539); // execute the 'Update Marker from Source' from the menu