Is it possible to set the duration of a marker via a script? It appears so via the scripting guide, but I can't actually get it to work. Does anyone have experience with this?

A basic example. A comp, with one layer, with one marker. The alert returns the correct value of the marker, but if you look at the marker on the timeline or double click it, the duration doesn't actually change.

Thanks for the quick response! That example code block was able to solve my problem, though not only restricted to AE 14.0. Access to comp markers is new to AE 14.0 but not to layer markers as I was looking for.

The solution to my problem is that I should set the duration of the marker before the script adds the marker to the layer. A simple answer that I never thought of.