I have an AppleScript that I want to run with a keyboard shortcut. The script uses the current selection of text if it is available, but will also work without it. I have created an Automator Service for this.
If I select "Service receives selected text", it works if I have text selected, but will not run if I don't have text selected. I can change to "Service receives no input", but then I won't get the selection even if I have something selected before.
What I am looking for is some way to launch the script and pass in the selection is available, and launch the script with no (or empty) input if nothing is selected. But it should work with the same keyboard shortcut in both cases. Is this possible? Thanks!