This must be common knowledge but I can't find a thread.
How do I check that there is a selection (that some pixels are at least partly selected), before using a function that will throw an error if there is none?
OK found it here: http://forums.adobe.com/message/1116546.
I'm surprised there's not something built in.
Retrieving data ...