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.

Dmitry
  • 928
  • 1
  • 9
  • 14

1 Answers1

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

clozach
  • 1,123
  • 1
  • 10
  • 14
  • 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. – Rory O'Kane Apr 15 '19 at 19:56