I have an Automator Service entitled "Calculator" that is comprised of a single "Run AppleScript" action. It takes the selected text and then performs a calculation on this input text.
If the selected text is editable, I would like the Service to type the result. If the selected text is uneditable, I would like the Service to communicate the result via a dialog.
I know how to achieve these outcomes in AppleScript. I understand that my goal is entirely feasible if I set up two, separate Services. But, is there a way for my AppleScript-based Service to automatically determine whether the selected text is editable or not, so that I can add an
if <selected text is editable> then statement?