2

I want to create a macro for Sketch. I want to execute some commands, for example, save the file, run some plugins, etc. Is there a way I can do this?

I'm using a Macbook Pro with OSX 13, I use this app called Sketch (for creating web and app designs and prototypes). As a part of my workflow I use some plugins to export and organize artworks. I would like to automate some processes by executing a macro or a script, and make the App execute some commands automatically. (Go to the Plugins menu, select an option, and so on). I'm not sure if that is something that can be done, but it will be helpful to save some time.

1

I haven't used Sketch, so can't comment on how well it may work with Automator, but one option would be for you to create an Automator workflow to try and replicate your actions.

There are many online resources that can help you get started. Below are three of them:

You can also use Automator’s ability to record what you’re doing to create the basis of your workflow and then modify it to meet your needs. To do this:

  1. Open Automator
  2. Press commandN (or go to File > New)
  3. Select the Application option
  4. Click the Choose button
  5. Click the red Record button (located at top right of the toolbar)
  6. Now carry out one of the tasks you want to automate (i.e. switch over to Sketch, click on the Plugins menu, etc)
  7. Automator will record your actions to try and copy your workflow
  8. Stop the recording
  9. Now back within Automator save your workflow

NOTES:

  • Recorded Automator tasks are far from perfect and often require you to manually edit them to work the way you want, but it may be a way for you to get started.
  • Depending on what you're doing, you may need to give permission for things to work. For example, if you create an application you may need to go to System Preferences > Security & Privacy and within the Privacy tab select the Accessibility option in the Sidebar and then give permission to what you've just created so that it can control your Mac.

You must log in to answer this question.

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