How to Automate Boring Tasks Using Script Events Manager and Actions in Adobe Photoshop

How to Automate Boring Tasks Using Script Events Manager and Actions in Adobe Photoshop

There are many simple boring tasks which we are performing occasionally or on daily basis in Adobe Photoshop. I am talking about tasks like converting Background layer to normal/Smart Object layer when opening image, for example.

One way to automate simple boring tasks is to record the action(s). But wait, action must be played to be executed right? For a single step or two steps manually performed is it worth to record action? Probably not unless you can play action automatically based on some event like every time when opening a new document. Is it possible to do in Photoshop, I mean for non-scripters and non-coders? Yes, it is.

In this post, I will explain to you how to play action/script automatically based on an event (New Document, Open Document, Save Document...) in Adobe Photoshop using Script Events Manager.

What you can do with Script Events Manager in Photoshop

Script Events Manager allows you to automatically play/execute script or action based on some event.

What is a Photoshop event? One of the events is when you create a new document in Photoshop. Another event is when you open file...

How Script Events Manager can be useful 

Script Events Manager can fully automate boring, repetitive tasks based on some initial event like starting the application, when opening or saving the document and so on. One of the beauties of Script Events Manager is that automation based on events can be easily turned on/off without to even restart the application.

Remind yourself of Script Events Manager every time that you work with 3 or more files where you need to perform same, repetitive tasks which have the same event as a starting point. Note: there is a limited list with "default" events which you can choose. List of events can be expanded but let's keep it simple in this post. Here are some tips to add Photoshop events.

Let me give you some examples.

  • You want something to automate when creating a new document (new files which you are creating must have a certain background, action /script can place a logo or any other design element imediatelly after creating a new document... )
  • You want something to automate when opening documents (resize document, change resolution, convert layers in the layered files to Smart Object layer  immediately after opening the file...) 
  • You want something to automate after saving the document (save or export saved file with different dimensions/file formats)


How to access and use Script Events Manager

Script Events Manager is available from File > Scripts > Script Events Manager. Here are options available to you:

  • Photoshop Event drop-down list allows you to select event which will run script/action.
  • Script drop-down list allows you to choose which script to run when a particular event (chosen from Photoshop Event drop-down list) occur. Leave default Clear Listener if you do not want to run any script.
  • Action section allows you (when checked) to choose action set and action from the drop-down lists which you want to play when some particular event occurs (event from Photoshop Event drop-down list).

How to run action triggered by some event

I will focus on actions in this post. To run a script based or triggered by some event the process is very similar. The only difference is that you will use Script drop down instead of Action drop-down lists.

If you are going to use actions then it is required to have set with action(s) loaded in the actions panel. Note: actions must be loaded in the Actions panel and events will always trigger action unless you manually remove event in Script Events Manager.

Lastly, you can choose script or action, not both of them but you can use the same event multiple times.
Same event used twice in Script Events Manager in Photoshop
Only one action or script can be assigned to an event. The same event can be used multiple times.


  • Choose an event from Photoshop Event drop-down list.
  • Check Action then select action set from the first drop-down list. Choose which particular action you want to play from the second drop-down list.
  • Click Add button on the left side of the dialog.
  • You can add more than one event during the same session. Pairs event/action will appear in the text field at the top of the dialog.
  • Ensure that Enable Events to Run Scripts/Actions is checked.
  • Click Done button.
  • Events will start triggering actions/scripts immediately unless you have chosen Start Application event which requires to restart Photoshop.
  • To remove some event/action pair click on it then click Remove button. To remove all events/actions click Remove All button.

Assign action to Photoshop event in Script Events Manager
Steps to assign the action to Photoshop event in Script Events Manager dialog.

Bonus tip

Now let's talk about more complicated actions beside one or two-step actions. There is no limitation in a number of steps or which action to play based on some event. However, sometimes you may need to use some basic logic to trigger action like play action only when a file has layers. That's when Conditional actions will come handy.

You can record the action with single if statement, for example, which will play another action only when a file which you are opening has layers (that's second actions which you must record).

Free action

Here is a free Photoshop action to test what you have learned in this tutorial. Action Convert to SM will check if the file has layers and convert all layers in the layered file to single Smart Object layer.

Note: action will also convert single layer to Smart Object layer if the only layer in your document is not Background layer.

To test this action choose Open Document from Photoshop Event drop-down list. Check Action then choose Layers Operations action set from the first drop-down list and Convert to SM action from the second drop-down list.




Product used in this tutorial:
Adobe Photoshop CC 2018

Reference:
Scripting

Comments

Popular posts from this blog

How to Change Artboard Size in Adobe Photoshop

Free Puzzle Pieces Actions For Photoshop and Elements

Old Weathered Vertical Wooden Planks Free Image