Learning JSX for Photoshop

In first why choose “JavaScript” and not “VBscript” or AppleScript” ?
the response is simple, JavaScript work with the two platform used by adobe : Win and Macos
In photoshop, we know all the “action” but there is some limitations :

  • – Impossibility to record specific command
  • – No capacity to make conditional command
  • – limitations for some repetitive and complex request
  • – ……..

The good sides of actions are :

  • – Simple to customize and record
  • – No need to learn anything
  • – ….

I like use actions, but in some case in encounter the limitations of actions, and I want to push photoshop and automation at the max….
So I’m starting to learn JSX. One big advantage is there is numerous source on the web for learning JSX.


Starting to learn :
What’s happen? do i suddendly going crazy to learning JSX !!!
It’s was i think at first time, but after looking at the classic first lesson the “hello world”, i understand the potential, and want to make my first experiments… the result: a joke script (named “who are you”).

Followed by an real tool the “Two windows” (TW) script.
Making my joke script help me to understand the use of variable and the conditionnal tools, which i need in the “TW” script.

The “TW” is also a bit more complex to write, because i need to run some menu function of photoshop for make it work.
And for this one i need to find where and how use the good command.
The “TW” request me to use variable, conditional (by selecting its longest side) and run menu command for lets photoshop automatically choose to tile in vertical or horizontal position the pictures.

My scripts :
I link you my first script (more a joke than a real tool) and the second script which this time is a real tool :
The first :
This script ask your Name and Town, and salute you…
if you give “Marco” and “Tropoja” as response you will have a surprise….
Download link : Who are you
The second :

This script open two window on your screen to work on the details on one windows and make your global control on the other.
Download link : Two windows

you can create an action for load the script and assign a simple shortcut to load the action and make the script run.
The how to : Shortcut for Script

I will share with you future scripts, you can join my  mailing list for news,
No spam, you will receive only info about the center of interest you check when you suscribe to the mailing list 😉


Some of the source I use :

The devnet page of adobe for photoshop
https://www.adobe.com/devnet/photoshop/scripting.html
The  CC 2019 version documentation
https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-scripting-guide-2019.pdf
https://www.adobe.com/content/dam/acom/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref-2019.pdf
Great ressource :
https://community.adobe.com/t5…
https://www.ps-scripts.com/
Software :
Visual studio code
https://visualstudio.microsoft.com/
https://marketplace.visualstudio.com/items?itemName=Adobe.extendscript-debug
More
Patience and passion…
Github and Google… as know as “is your friend” 😉

Facebooktwitterredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *