This project is currently very much a work in progress. Check it out to get ideas, but be warned some of the functions are incomplete or unfinished and very much undocumented.
This JavaScript library is intended to help quickly manage common tasks when automating tasks in Photoshop. It takes common tasks such as sampling a color or selecting layers, that sometimes take multiple lines of code or easedropping on the ScriptListener plugin, and wraps them in some straight forward and human friendly function names.
You can review samples/tests.jsx for some example of using the tools provided in Shoppe.js
#include "/path/to/shoppe.js"
sjs.doc.resizeLongest(800); // resize document so longest side is 800 pixels
Shoppe is comprised of a few collections of methods to make it easy to learn and use.
sjs.app.*
: application related methodssjs.doc.*
: document related methods including creation and testing of propertiessjs.color.*
: color related methods including samplingsjs.random.*
: convenience methods for generating random numbers or colorssjs.text.*
: text layer related methodssjs.layer.*
: general and art layer methodssjs.meta.*
: metadata and exit related methodssjs.history.*
: history related methods
Note that these groups closely parallel the built in organization of the Photoshop Object Model or Core JavaScript objects. sjs.random
enhances Math.random()
with Photoshop related features such as random color creation, and sjs.doc
makes working with the app.documents
array or app.activeDocument
much easier.
- Check the ExtendScript Toolkit application's help menu & read the docs!
- PSScript Forums
- xtools library
- Power, Speed & Automation with Adobe Photoshop, Geoff Scott & Jeffrey Tranberry, focal press, 2012
- Adobe Photoshop, but you knew that.