I’m trying my hand at creating an OS X service that outputs Markdown style links from a URL in the clipboard. I want it to be able to handle selected text input and cases where there’s no text selection.
I’ve been following Apple’s Services Implementation Guide, and by setting NSSendTypes to NSStringPBoardType the service can properly accept selected text, and if I remove the NSSendTypes key it will run without selected text, but I can’t find a way to have my service accessible in both situations.
Is there an Info.plist key I can set to allow this behaviour, or am I restricted to one or the other?
I contacted Apple’s Developer Support about this issue, and after a bit of investigating, they told me that this is currently not possible (as of September 25, 2012).
I have filed an enhancement request on bugreport.apple.com, which you can view on Open Radar if you’re interested (by all means, file duplicates with Apple if you’d like the same thing added).