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.
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; //MyComposition on the project which relates to item 13
var test= bodyComp.layers; // 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