PhotoshopCC 2015.5
Object

Application

The Adobe Photoshop application object, which contains all other Adobe Photoshop objects.

Properties

NameType AccessDescription
Document read/write The frontmost document.
SolidColor read/write The default background color (used to paint, fill, and stroke selections).
String readonly The build number of Adobe Photoshop application.
Varies read/write The name of the selected color setting's set.
String read/write Name of the current tool.
DialogModes
read/write The dialog mode for the document, which indicates whether or not Photoshop displays dialogs when the script runs.
Documents<Document> readonly The collection of open documents.
TextFonts<TextFont> readonly The fonts installed on this system.
SolidColor read/write The default foreground color (used to paint, fill, and stroke selections).
Number readonly The amount of unused memory available to Photoshop.
String readonly The language locale of the application.
String[] readonly A list of the image file types Photoshop can open.
MeasurementLog readonly The log of measurements taken.
String readonly The application name.
Notifiers<Notifier> readonly The notifiers currently configured (in the Scripts Events Manager menu in the application).
Boolean read/write If true, notifiers are enabled.
The readonly The object's container.
File readonly The full path of the location of the Adobe Photoshop application.
DialogModes
read/write The dialog mode for playback mode, which indicates whether or not Photoshop displays dialogs in playback mode.
ActionDescriptor read/write The playback options, which indicate the speed at which Photoshop plays actions.
Preferences readonly The application preference settings (equivalent to selecting Edit > Preferences in the Adobe Photoshop application in Windows or Photoshop > Preferences in Mac OS).
File readonly The full path to the preferences folder.
FileArray readonly Files in the Recent Files list.
String readonly The build date of the scripting interface.
String readonly The version of the Scripting interface.
String readonly System information of the host application and machine.
String readonly The class name of the object.
String readonly The version of Adobe Photoshop application that you are running.
String[] readonly A list of the image file extensions Photoshop can open.

Methods

void

PRIVATE - set the current tool brush from a file.

file File Brush file to apply.
String

Runs the batch automation routine; analogous to using the Batch command in Photoshop.

inputFiles AliasArray The files to operate on.
action String The name of the action to play (note that the Action name is case-sensitive and must match the name in the Actions palette).
from String The name of the action set containing the action being played (note that the Action Set name is case-sensitive and must match the name in the Actions palette).
options? BatchOptions Options for batch automation.
void

Alerts the user.

void

Makes Photoshop the active application.

void

Changes the text that appears in the progress window.

progressString String String to show in the progress window.
→ Int

Converts from a four character code to a runtime ID.

charID String The ID to convert.
void

Plays the specified action from the Actions palette.

action String The name of the action to play. (Note that the action name is case-sensitive and must match the name as it appears in the Actions palette.)
from String The name of the action set containing the action being played. (Note that the Action Set name is case-sensitive and must match the name as it appears in the Actions palette.)
void

Performs a task with a progress bar. Forces progress bar to display, ignoring the normal heuristics that keep it from showing unnecessarily (e.g. during very short tasks). Other progress APIs must be called periodically to update the progress bar and allow cancelling.

progressString String String to show in the progress window.
javaScriptString String JavaScriptString to execute.
void

Performs a task with a progress bar. Other progress APIs must be called periodically to update the progress bar and allow cancelling.

progressString String String to show in the progress window.
javaScriptString String JavaScriptString to execute.
Boolean

Sections off a portion of the unused progress bar for execution of a subtask. Returns false on cancel. Use when iterating a list of tasks with unequal run times.

segmentLength Int The length of the current task.
done Int The total length of all completed tasks.
total Int The total length of all tasks.
javaScriptString String JavaScriptString to execute.
Boolean

Sections off a portion of the unused progress bar for execution of a subtask. Returns false on cancel. Use when iterating a simple list of tasks with equal run times.

index Int The 0-based index of the current task.
limit Int The total number of tasks.
javaScriptString String JavaScriptString to execute.
Boolean

Sections off a portion of the unused progress bar for execution of a subtask. Returns false on cancel.

taskLength Number Amount of the unused progress bar to section off, between 0.0 and 1.0.
javaScriptString String JavaScriptString to execute.
void

Removes the specified user objects from the Photoshop registry.

key String The unique string ID for user object(s) to remove.
ActionDescriptor

Plays an ActionManager event.

eventID Int The event to play.
descriptor? ActionDescriptor The action descriptor to play.
displayDialogs? DialogModes The display permissions for dialogs and alert messages.
Boolean

If true, the specified feature is enabled.

name String The name of the feature.
ActionDescriptor

Retrieves user objects from the Photoshop registry for the ID with value key.

key String The unique string ID for the user object.
Boolean

Returns true if Quicktime is installed.

void

Loads a support document.

document File The document to load.
String

Creates a contact sheet from multiple files.

inputFiles AliasArray The files to include.
options? ContactSheetOptions Options for creating the contact sheet.
String

Creates a PDF presentation file.

inputFiles AliasArray The input files to include in the presentation.
outputFile File The location of the output file.
options? PresentationOptions Options for the PDF presentation.
String

DEPRECATED. Creates a web photo gallery.

inputFolder Varies Folder to process or an array of files to process.
outputFolder File Location for output files.
options? GalleryOptions Options for the web photo gallery.
String

DEPRECATED. Merges multiple files into one, user interaction required.

inputFiles AliasArray List of input files to include.
String

Creates a picture package from multiple files.

inputFiles AliasArray The files to include.
options? PicturePackageOptions Options for creating a Picture Package.
Document

Opens the specified document file(s).

document File The document(s) to opend.
as? Varies The document type (The default is to let Photoshop deduce the format).
asSmartObject? Boolean Creates a smart object around the document.
→ FileArray

Uses the Photoshop open dialog to select files.

void

Purges one or more caches.

target PurgeTarget The caches to purge.
void

Save user objects in the Photoshop registry.

key String The unique string ID for the user object.
customObject ActionDescriptor The user-defined custom object to save in the registry.
persistent? Boolean If true, the object persists after the script has finished.
void

Pauses the script until the application refreshes.

void

Force the font list to get refreshed.

void

Run a menu item.

menuID Int Id of menu to run.
void

PRIVATE - save the current tool brush to a file.

file File File to save the brush to.
Boolean

Display color picker dialog. Returns false if dialog is cancelled, true otherwise.

pickForeground? Boolean If true the foreground color is chosen, if false the background color is chosen.
→ Int

Converts from a string ID to a runtime ID.

stringID String The ID to convert.
→ Int

Perform a system call.

callString String System call string.
void

PRIVATE - write out a thumbnail file from a style file.

file File Style file to read.
dest File Thumb file to write.
thumbnailSize? Int Size of thumbnail to save.
backgroundValue? Number Background grayvalue.
void

PRIVATE - write out a thumbnail file from text parameters.

dest File Thumb file to write.
text? String Text to render.
font? String PostScript name of font.
size? Int Size of type.
color? SolidColor Color of type.
void

Toggle palette visibility.

Boolean

Check if the specified tool supports brushes.

tool String The name of the tool to check.
String

Converts from a runtime ID to a character ID.

typeID Int The ID to convert.
String

Converts from a runtime ID to a string ID.

typeID Int The ID to convert.
Boolean

Updates the progress bar started by doProgress. Use for manual non-task based progress updating. Returns false on cancel.

done Int The number of tasks completed.
total Int The total number of tasks.