Photoshop Scripts – Automate your work – Part III – Defining a Pattern
Toady we are going to use scripts to define a pattern from an image. This is going to be a little more complex, because we are going to use ActionDescriptors. What it means is that we are going to use objects called ActionDescriptors that emulate a Photoshop action. This action will take the current open […]
Toady we are going to use scripts to define a pattern from an image. This is going to be a little more complex, because we are going to use ActionDescriptors. What it means is that we are going to use objects called ActionDescriptors that emulate a Photoshop action.
This action will take the current open document and make it into a pattern, with a name that you enter on a prompt. This code is heavily based on using the Photoshop’s ScriptListener. The ScriptListener records you actions in Photoshop, so you can later read and use that coded in your own scripts.
Installing the ScriptListener
As of this writing there have been some issues installing the ScriptListener. Here is how you do it.
- Download the Scriptlistener from https://helpx.adobe.com/photoshop/kb/downloadable-plugins-and-content.html
- Unzip the file – there should a file called: “ScriptingListener.plugin”
- In the folder Applications\Adobe Photoshop [Photoshop_version]\Plug-ins\ – create a new folder called “Utilities”
- Copy the downloaded file to your utilities folder.
Now every time you record an action, it will be saved to a file on your desktop called “ScriptingListenerJS.log” – The last action will be at the very bottom of the file, looking something like this:

Now we can use this to write our own script:

And you can see it in action here.

Next we are going to apply a pattern to multiple files different dimensions.