Corby,
I was fishing on the internet for something very similar to what you were trying to do, got to the end of your thread, and was disappointed. about 5 minutes later I figured it out, after stumbling upon the valueAtKey function.
thought I’d post it for future scripters
here is the magic code:
layerRef.marker.keyValue(IndexVariable).comment
layerRef is a reference to a specific layer
marker is the property
keyValue is the function you need to be able to do this.
indexVariable can be your loop variable in a for loop
comment is how you get the value of the comment of the marker (you could use another value there like: chapter, or url.
layerRef.marker.keyValue(IndexVariable).comment