1

Devontechnologies offers a collection of services that let's the user perform some common tasks on text (upper case, lower case, ROT13 and so on). They do it without (as far as I can tell at least) using the clipboard (pbpaste/pbcopy).

I have googled a lot about this but the only solutions I have found are based on pbcopy/pbpaste and I want to avoid that. Any suggestions?

I am creating my own service similar to Devon's WordServices that takes an editable piece of text, manipulates it and finally replaces the original text.

1 Answer 1

3

You could use an Automator contextual workflow service.

  1. Open Automator select Contextual Workflow enter image description here

  2. Enter the following settings

    • Workflow Receives: text
    • In: Any Applicaition
    • Check Output replaces selected text
  3. Add the AppleScript Action

enter image description here

  1. The selected text will be in the input variable. It will return the input variable at the end thus replacing the original text with the new text

The workflow can be accessed by selecting text, right clicking, and going to Services.

enter image description here

4
  • Thanks a lot. I was looking around in Automator but at the wrong spot. Just curious, I thought everything in Automator could be done using Applescript, am I mistaken?
    – d-b
    Jun 14, 2018 at 19:54
  • @d-b Most things not this.
    – JBis
    Jun 14, 2018 at 19:55
  • Hmm, I don't have something called "Contextual Workflow" but I do have something called "Service" with the same icon. Which version are you using?
    – d-b
    Jun 15, 2018 at 0:30
  • @d-b That’s the correct one. See pictures.
    – JBis
    Jun 15, 2018 at 0:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .