Use markers in After Effects as triggers for a particular animation
Markers are a special time of key, basically you can think of them as keys on a property of the layer called "marker", just like you can use keys on say, the position property. To access a marker on a layer you use

var myMarker = marker.key(n)


where n is the number of the key you want (counting from 1, not zero. WTF Adobe?) or alternatively:

var myMarker = marker.nearestKey(time)


Which will give you the nearest key, which can be ahead of or behind the current time.

Once you have the markerKey object you can get its time, duration, index (useful if you used the nearestKey method), and all of the metadata that can be stored in markers (quite a lot). Details about all the marker properties here. For example, if your marker has a comment, you can get the text of the comment thus

var myMarker = marker.key(n);
var theComment = myMarker.comment;


You can access comp markers too, just use

var myMarker = thisComp.marker.key(n); //or
var myOtherMarker = thisCom.marker.nearestKey(time);