7

How can I add a comment in the script in Automator in OS X? I've tried many variants but they don't work.

2
  • Are you talking about spotlight comments ?
    – clhy
    Nov 5, 2015 at 19:25
  • What is spotlight comments?
    – Dmitry
    Nov 6, 2015 at 8:29

1 Answer 1

5

Based on the crickets chirping here, I'm going to guess that there are no built-in non-acting actions. There is a simple workaround, however:

Create a comments-only script

enter image description here

If you don't like the # syntax, there's also bash multiline syntax

enter image description here

…or for a more muted effect, the Run Javascript and Run Applescript panes use gray for comments…

enter image description here

Of course, any time your compilable "comment scripts" haven't yet compiled—such as just after opening—you'll get a lovely shade of purple instead of gray. Which could be kinda cool, depending on your preferences.

enter image description here

1
  • 1
    There are a few other things you can do to make a “Run…” action more comment-like. Open the action’s Options and check “Ignore this action’s input”, right-click the action and choose Rename to add a title to your action like “Run Shell Script (comment: why I did it this way)”, and right-click the action and choose Disable so the workflow won’t spend time running an empty action. You might prefer not to Disable the action, since that also collapses the comment text. Apr 15, 2019 at 19:56

You must log in to answer this question.

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