What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

Here is the basics...


First, where do you find documentation?

Answer: On your own computer, it gets installed with your version of Photoshop.

In the following folders:

PC: C:\Program Files\Adobe\Adobe Photoshop CS#\Scripting Guide

MAC: <hard drive>/Applications/Adobe Photoshop CS#/ Scripting Guide

Here you will find :-

Photoshop Scripting Guide.pdf

AppleScript Reference Guide.pdf

JavaScript Reference Guide.pdf

VisualBasic Reference Guide.pdf

On a PC you can script using VisualBasic or JavaScript

On a Mac you can script using AppleScript or JavaScript

As you can see JavaScript is Cross Platform works on both PC and Mac so all the following will reference JavaScript.

To create/edit your scripts Adobe has kindly supplied you with an editor/debugger

This is called ExtendScript Toolkit)

This utility can be found in the relevant folder:-

PC: C:\Program Files\Adobe\Adobe Utilities

MAC: <hard drive>/Applications/Utilities/Adobe Utilities

Now for the ubiquitous Hello World program

[code]

 alert(“Hello World”);

[/code]

 

Now you will need to run the code. There are a few ways this can be done.

From Extendscript Toolkit (With Photoshop selected from the dropdown box).

Save the script to anywhere you like or use the preferred folders

PC: C:\Program Files\Adobe\Adobe Photoshop CS#\Presets\Scripts

MAC: <hard drive>/Applications/Adobe Photoshop CS#/ Presets/Scripts

Once the script has been saved, in Photoshop File – Scripts and select you script (if you have saved it in the preferred folder) or File – Scripts – Browse (to where you have saved it)

An action can be created to call a script or a keyboard shortcut via

Edit – Keyboard Shortcuts – File – Scripts

It is even possible to write a javaScript resource so that you script will show in the Filter or Help Menu.

For a few more javaScript examples look no further than your own machine:-

PC: C:\Program Files\Adobe\Adobe Photoshop CS#\Scripting Guide\Sample Scripts\JavaScript

MAC: <hard drive>/Applications/Adobe Photoshop CS#/ Scripting Guide/Sample Scripts/JavaScript


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top