Listener and Getter are similar but not the same. The same part is the way that getter/listener "dump" descriptor information to disk. Listner code can be copy/pasted to an automation plug-in and executed 99% of the time. Implementing getter code in your automation plug-in is different. You should look at the Getter example to see exactly what is going on. Getter shows you what can be "got" from Photoshop. Meaning, if Getter can write it to disk then the information is available.
Here is the trick.
Listener uses Put* routines. Getter needs Get* routines but 'writes' Put* routines because the same routine is writing out the descriptor contents. (Think about it for a while and it will be clear.)
So, figure out what class you need to "get". classApplication, classDocument, classLayer.
Figure out what property you need. keyNumberOfDocuments, keyName
And grab that info with a eventGet.
... View more