Package | com.adobe.photoshop |
Class | public class Application |
Inheritance | Application ![]() ![]() ![]() |
Since : | CS5 |
Property | Defined By | ||
---|---|---|---|
activeDocument : Document
The frontmost document. | Application | ||
backgroundColor : SolidColor
The default background color (used to paint, fill, and stroke selections). | Application | ||
build : String [read-only]
The build number. | Application | ||
colorSettings : Object
The name of the selected color setting's set. | Application | ||
displayDialogs : DialogModes
The dialog mode for the document, which indicates whether or not Photoshop displays dialogs when the script runs. | Application | ||
documents : Documents [read-only]
The collection of open documents. | Application | ||
fonts : TextFonts [read-only]
The fonts installed on this system. | Application | ||
foregroundColor : SolidColor
The default foreground color (used to paint, fill, and stroke selections). | Application | ||
freeMemory : Number [read-only]
The amount of unused memory available to Photoshop. | Application | ||
![]() | hostObjectDelegate : HostObject Getter for the delegate | CSHostObject | |
locale : String [read-only]
The language locale of the application. | Application | ||
macintoshFileTypes : Array [read-only]
A list of the image file types Photoshop can open. | Application | ||
measurementLog : MeasurementLog [read-only]
The log of measurements taken. | Application | ||
name : String [read-only]
The application name. | Application | ||
notifiers : Notifiers [read-only]
The notifiers currently configured (in the Scripts Events Manager menu in the application). | Application | ||
notifiersEnabled : Boolean
If true, notifiers are enabled. | Application | ||
![]() | parent : * [read-only] | PhotoshopHostObject | |
path : File [read-only]
The full path of the location of the Adobe Photoshop application. | Application | ||
playbackDisplayDialogs : DialogModes
The dialog mode for playback mode, which indicates whether or not Photoshop displays dialogs in playback mode. | Application | ||
playbackParameters : ActionDescriptor
The playback options, which indicate the speed at which Photoshop plays actions. | Application | ||
preferences : Preferences [read-only]
The application preference settings (equivalent to selecting Edit > Preferences in the Adobe Photoshop application in Windows or Photoshop > Preferences in Mac OS). | Application | ||
preferencesFolder : File [read-only]
The full path to the preferences folder. | Application | ||
recentFiles : Array [read-only]
Files in the Recent Files list. | Application | ||
scriptingBuildDate : String [read-only]
The build date of the scripting interface. | Application | ||
scriptingVersion : String [read-only]
The version of the Scripting interface. | Application | ||
systemInformation : String [read-only]
The system and applicaiton information. | Application | ||
version : String [read-only]
The version of Adobe Photoshop application that you are running. | Application | ||
windowsFileTypes : Array [read-only]
A list of the image file extensions Photoshop can open. | Application |
Method | Defined By | ||
---|---|---|---|
batch(inputFiles:Object, action:String, from:String, options:BatchOptions = null):String
Runs the batch automation routine; analogous to using the Batch command in Photoshop. | Application | ||
beep():void
Alerts the user. | Application | ||
bringToFront():void
Makes Photoshop the active application. | Application | ||
charIDToTypeID(charID:String):Number
Converts from a four character code to a runtime ID. | Application | ||
doAction(action:String, from:String):void
Plays the specified action from the Actions palette. | Application | ||
eraseCustomOptions(key:String):void
Removes the specified user objects from the Photoshop registry. | Application | ||
executeAction(eventID:Number, descriptor:ActionDescriptor = null, displayDialogs:DialogModes = null):ActionDescriptor
Plays an ActionManager event. | Application | ||
Obtains an action descriptor. | Application | ||
featureEnabled(name:String):Boolean
If true, the specified feature is enabled. | Application | ||
![]() | filterArgsForHBAPI(args:Array):Array [static]
Function to clean up the argument list and put it into a format that
makes sense for HBAPI. | CSHostObject | |
![]() | filterSingleObjectForHBAPI(value:Object):Object [static]
| CSHostObject | |
![]() | getClassObjectForName(className:String):HostObject [static] This returns a "Class" object, meaning, a HostObject that can be used
to make static function calls or get static properties
| CSHostObject | |
getCustomOptions(key:String):ActionDescriptor
Retrieves user objects from the Photoshop registry for the ID with value key. | Application | ||
![]() | getSpecialTranslation(className:String, ho:HostObject, expectedReturnType:Class, ownerName:String):* [static] | CSHostObject | |
![]() | hostCall(name:String, expectedReturnType:Class, rawargs:Array):*
Encapsulates a function call to the host
| CSHostObject | |
![]() | hostCallStatic(className:String, methodName:String, expectedReturnType:Class, rawargs:Array):* [static]
Implements a safe call of a static method on the host
| CSHostObject | |
![]() | hostGet(name:String, expectedReturnType:Class):*
Encapsulates a property get to the host
| CSHostObject | |
![]() | hostGetIndex(idx:Object, expectedReturnType:Class):*
Encapsulates a indexed get to the host
| CSHostObject | |
![]() | hostGetStatic(className:String, propertyName:String, expectedReturnType:Class):* [static]
Implements a safe get of a static property on the host
Used by for instance, all the enum implementations. | CSHostObject | |
![]() | hostSet(name:String, rawvalue:*):void
Encapsulates a property set to the host
| CSHostObject | |
![]() | hostSetStatic(className:String, propertyName:String, rawvalue:*):* [static]
Implements a safe set of a static property on the host
| CSHostObject | |
![]() | isDescendedFrom(clz:Class, ancClass:Class):Boolean [static] Efficiently determines whether or not one class descends from
another in inheritance hierarchy- class relationships are cached
by the ClassUtils implementation-
(uses org.as3commons lib to quickly discover class hierarchy. | CSHostObject | |
isQuicktimeAvailable():Boolean
returns true if Quicktime is installed
| Application | ||
load(document:File):void
Loads a support document. | Application | ||
makeContactSheet(inputFiles:Object, options:ContactSheetOptions = null):String
Creates a contact sheet from multiple files. | Application | ||
makePDFPresentation(inputFiles:Object, outputFile:File, options:PresentationOptions = null):String
Creates a PDF presentation file. | Application | ||
makePhotoGallery(inputFolder:Object, outputFolder:File, options:GalleryOptions = null):String
Deprecated for Adobe Photoshop CS3. | Application | ||
makePhotomerge(inputFiles:Object):String
Deprecated for Adobe Photoshop CS3. | Application | ||
makePicturePackage(inputFiles:Object, options:PicturePackageOptions = null):String
Creates a picture package from multiple files. | Application | ||
Opens the specified document file(s). | Application | ||
openDialog():Object
Uses the Photoshop open dialog to select files. | Application | ||
purge(target:PurgeTarget):void
Purges one or more caches. | Application | ||
putCustomOptions(key:String, customObject:ActionDescriptor, persistent:Boolean = true):void
Saves user objects in the Photoshop registry. | Application | ||
refresh():void
Pauses the script until the application refreshes. | Application | ||
refreshFonts():void
force the font list to get refreshed
| Application | ||
![]() | replaceDefaultArgs(args:Array, defaultArgs:Array):Array
Function to tidy up arguments prior to call. | CSHostObject | |
runMenuItem(menuID:Number):void
Run a menu item with the given ID. | Application | ||
showColorPicker(pickForeground:Boolean = true):Boolean
display color picker dialog. | Application | ||
stringIDToTypeID(stringID:String):Number
Converts from a string ID to a runtime ID. | Application | ||
system(callString:String):Number
perform a system call
| Application | ||
togglePalettes():void
Toggle palette visibility. | Application | ||
typeIDToCharID(typeID:Number):String
Converts from a runtime ID to a character ID. | Application | ||
typeIDToStringID(typeID:Number):String
Converts from a runtime ID to a string ID. | Application | ||
![]() | wrapReturnedHostObject(rawObject:Object, expectedReturnType:Class, client:CSHostObject, propertyName:String):* [static]
Method used on static/normal get/ hostcalls
| CSHostObject |
activeDocument | property |
activeDocument:Document
Since : | CS5 |
The frontmost document.
public function get activeDocument():Document
public function set activeDocument(value:Document):void
backgroundColor | property |
backgroundColor:SolidColor
Since : | CS5 |
The default background color (used to paint, fill, and stroke selections).
public function get backgroundColor():SolidColor
public function set backgroundColor(value:SolidColor):void
build | property |
build:String
[read-only] Since : | CS5 |
The build number.
public function get build():String
colorSettings | property |
colorSettings:Object
Since : | CS5 |
The name of the selected color setting's set.
public function get colorSettings():Object
public function set colorSettings(value:Object):void
displayDialogs | property |
displayDialogs:DialogModes
Since : | CS5 |
The dialog mode for the document, which indicates whether or not Photoshop displays dialogs when the script runs.
public function get displayDialogs():DialogModes
public function set displayDialogs(value:DialogModes):void
documents | property |
documents:Documents
[read-only] Since : | CS5 |
The collection of open documents.
public function get documents():Documents
fonts | property |
fonts:TextFonts
[read-only] Since : | CS5 |
The fonts installed on this system.
public function get fonts():TextFonts
foregroundColor | property |
foregroundColor:SolidColor
Since : | CS5 |
The default foreground color (used to paint, fill, and stroke selections).
public function get foregroundColor():SolidColor
public function set foregroundColor(value:SolidColor):void
freeMemory | property |
freeMemory:Number
[read-only] Since : | CS5 |
The amount of unused memory available to Photoshop.
public function get freeMemory():Number
locale | property |
locale:String
[read-only] Since : | CS5 |
The language locale of the application.
public function get locale():String
macintoshFileTypes | property |
macintoshFileTypes:Array
[read-only] Since : | CS5 |
A list of the image file types Photoshop can open.
public function get macintoshFileTypes():Array
measurementLog | property |
measurementLog:MeasurementLog
[read-only] Since : | CS5 |
The log of measurements taken.
public function get measurementLog():MeasurementLog
name | property |
name:String
[read-only] Since : | CS5 |
The application name.
public function get name():String
notifiers | property |
notifiers:Notifiers
[read-only] Since : | CS5 |
The notifiers currently configured (in the Scripts Events Manager menu in the application).
public function get notifiers():Notifiers
notifiersEnabled | property |
notifiersEnabled:Boolean
Since : | CS5 |
If true, notifiers are enabled.
public function get notifiersEnabled():Boolean
public function set notifiersEnabled(value:Boolean):void
path | property |
path:File
[read-only] Since : | CS5 |
The full path of the location of the Adobe Photoshop application.
public function get path():File
playbackDisplayDialogs | property |
playbackDisplayDialogs:DialogModes
Since : | CS5 |
The dialog mode for playback mode, which indicates whether or not Photoshop displays dialogs in playback mode.
public function get playbackDisplayDialogs():DialogModes
public function set playbackDisplayDialogs(value:DialogModes):void
playbackParameters | property |
playbackParameters:ActionDescriptor
Since : | CS5 |
The playback options, which indicate the speed at which Photoshop plays actions.
public function get playbackParameters():ActionDescriptor
public function set playbackParameters(value:ActionDescriptor):void
preferences | property |
preferences:Preferences
[read-only] Since : | CS5 |
The application preference settings (equivalent to selecting Edit > Preferences in the Adobe Photoshop application in Windows or Photoshop > Preferences in Mac OS).
public function get preferences():Preferences
preferencesFolder | property |
preferencesFolder:File
[read-only] Since : | CS5 |
The full path to the preferences folder.
public function get preferencesFolder():File
recentFiles | property |
recentFiles:Array
[read-only] Since : | CS5 |
Files in the Recent Files list.
public function get recentFiles():Array
scriptingBuildDate | property |
scriptingBuildDate:String
[read-only] Since : | CS5 |
The build date of the scripting interface.
public function get scriptingBuildDate():String
scriptingVersion | property |
scriptingVersion:String
[read-only] Since : | CS5 |
The version of the Scripting interface.
public function get scriptingVersion():String
systemInformation | property |
systemInformation:String
[read-only] Since : | CS5 |
The system and applicaiton information.
public function get systemInformation():String
version | property |
version:String
[read-only] Since : | CS5 |
The version of Adobe Photoshop application that you are running.
public function get version():String
windowsFileTypes | property |
windowsFileTypes:Array
[read-only] Since : | CS5 |
A list of the image file extensions Photoshop can open.
public function get windowsFileTypes():Array
batch | () | method |
public function batch(inputFiles:Object, action:String, from:String, options:BatchOptions = null):String
Since : | CS5 |
Runs the batch automation routine; analogous to using the Batch command in Photoshop.
Parameters
inputFiles:Object — (Object) The files to operate on.
| |
action:String — (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 — (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 (default = null ) — (com.adobe.photoshop.BatchOptions) Options for batch automation.
|
String |
beep | () | method |
public function beep():void
Since : | CS5 |
Alerts the user.
bringToFront | () | method |
public function bringToFront():void
Since : | CS5 |
Makes Photoshop the active application.
charIDToTypeID | () | method |
public function charIDToTypeID(charID:String):Number
Since : | CS5 |
Converts from a four character code to a runtime ID.
Parameters
charID:String — (String) The ID to convert.
|
Number |
doAction | () | method |
public function doAction(action:String, from:String):void
Since : | CS5 |
Plays the specified action from the Actions palette.
Parameters
action:String — (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 — (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.)
|
eraseCustomOptions | () | method |
public function eraseCustomOptions(key:String):void
Since : | CS5 |
Removes the specified user objects from the Photoshop registry.
Parameters
key:String — (String) The unique string ID for user object(s) to remove.
|
executeAction | () | method |
public function executeAction(eventID:Number, descriptor:ActionDescriptor = null, displayDialogs:DialogModes = null):ActionDescriptor
Since : | CS5 |
Plays an ActionManager event.
Parameters
eventID:Number — (Number) The event to play.
| |
descriptor:ActionDescriptor (default = null ) — (com.adobe.photoshop.ActionDescriptor) The action descriptor to play.
| |
displayDialogs:DialogModes (default = null ) — (com.adobe.photoshop.DialogModes) The display permissions for dialogs and alert messages.
|
ActionDescriptor |
executeActionGet | () | method |
public function executeActionGet(reference:ActionReference):ActionDescriptor
Since : | CS5 |
Obtains an action descriptor.
Parameters
reference:ActionReference — (com.adobe.photoshop.ActionReference) The reference specification of the property.
|
ActionDescriptor |
featureEnabled | () | method |
public function featureEnabled(name:String):Boolean
Since : | CS5 |
If true, the specified feature is enabled.
Parameters
name:String — (String) The name of the feature.
|
Boolean |
getCustomOptions | () | method |
public function getCustomOptions(key:String):ActionDescriptor
Since : | CS5 |
Retrieves user objects from the Photoshop registry for the ID with value key.
Parameters
key:String — (String) The unique string ID for the user object.
|
ActionDescriptor |
isQuicktimeAvailable | () | method |
public function isQuicktimeAvailable():Boolean
Since : | CS5 |
returns true if Quicktime is installed
ReturnsBoolean |
load | () | method |
public function load(document:File):void
Since : | CS5 |
Loads a support document.
Parameters
document:File — (flash.filesystem.File) The document to load.
|
makeContactSheet | () | method |
public function makeContactSheet(inputFiles:Object, options:ContactSheetOptions = null):String
Since : | CS5 |
Creates a contact sheet from multiple files.
Parameters
inputFiles:Object — (Object) The files to include.
| |
options:ContactSheetOptions (default = null ) — (com.adobe.photoshop.ContactSheetOptions) Options for creating the contact sheet.
|
String |
makePDFPresentation | () | method |
public function makePDFPresentation(inputFiles:Object, outputFile:File, options:PresentationOptions = null):String
Since : | CS5 |
Creates a PDF presentation file.
Parameters
inputFiles:Object — (Object) The input files to include in the presentation.
| |
outputFile:File — (flash.filesystem.File) The location of the output file.
| |
options:PresentationOptions (default = null ) — (com.adobe.photoshop.PresentationOptions) Options for the PDF presentation.
|
String |
makePhotoGallery | () | method |
public function makePhotoGallery(inputFolder:Object, outputFolder:File, options:GalleryOptions = null):String
Since : | CS5 |
Deprecated for Adobe Photoshop CS3. Creates a web photo gallery.
Parameters
inputFolder:Object — (Object) Folder to process or an array of files to process.
| |
outputFolder:File — (flash.filesystem.File) Location for output files.
| |
options:GalleryOptions (default = null ) — (com.adobe.photoshop.GalleryOptions) Options for the web photo gallery.
|
String |
makePhotomerge | () | method |
public function makePhotomerge(inputFiles:Object):String
Since : | CS5 |
Deprecated for Adobe Photoshop CS3. Merges multiple files into one, user interaction required.
Parameters
inputFiles:Object — (Object) List of input files to include.
|
String |
makePicturePackage | () | method |
public function makePicturePackage(inputFiles:Object, options:PicturePackageOptions = null):String
Since : | CS5 |
Creates a picture package from multiple files.
Parameters
inputFiles:Object — (Object) The files to include.
| |
options:PicturePackageOptions (default = null ) — (com.adobe.photoshop.PicturePackageOptions) Options for creating a Picture Package.
|
String |
open | () | method |
public function open(document:File, _as:Object = null, asSmartObject:Boolean = false):Document
Since : | CS5 |
Opens the specified document file(s).
Parameters
document:File — (flash.filesystem.File) The document(s) to opend.
| |
_as:Object (default = null ) — (Object) The document type (The default is to let Photoshop deduce the format).
| |
asSmartObject:Boolean (default = false ) — (Boolean) Creates a smart object around the document. ( default: false )
|
Document |
openDialog | () | method |
public function openDialog():Object
Since : | CS5 |
Uses the Photoshop open dialog to select files.
ReturnsObject |
purge | () | method |
public function purge(target:PurgeTarget):void
Since : | CS5 |
Purges one or more caches.
Parameters
target:PurgeTarget — (com.adobe.photoshop.PurgeTarget) The caches to purge.
|
putCustomOptions | () | method |
public function putCustomOptions(key:String, customObject:ActionDescriptor, persistent:Boolean = true):void
Since : | CS5 |
Saves user objects in the Photoshop registry.
Parameters
key:String — (String) The unique string ID for the user object.
| |
customObject:ActionDescriptor — (com.adobe.photoshop.ActionDescriptor) The user-defined custom object to save in the registry.
| |
persistent:Boolean (default = true ) — (Boolean) If true, the object persists after the script has finished. ( default: true )
|
refresh | () | method |
public function refresh():void
Since : | CS5 |
Pauses the script until the application refreshes.
refreshFonts | () | method |
public function refreshFonts():void
Since : | CS5 |
force the font list to get refreshed
runMenuItem | () | method |
public function runMenuItem(menuID:Number):void
Since : | CS5 |
Run a menu item with the given ID. Use this for Insert Menu Item.
Parameters
menuID:Number — (Number) id of menu to run
|
showColorPicker | () | method |
public function showColorPicker(pickForeground:Boolean = true):Boolean
Since : | CS5 |
display color picker dialog. Returns false if dialog is cancelled, true otherwise
Parameters
pickForeground:Boolean (default = true ) — (Boolean) if true the foreground color is chosen, if false the background color is chosen ( default: true )
|
Boolean |
stringIDToTypeID | () | method |
public function stringIDToTypeID(stringID:String):Number
Since : | CS5 |
Converts from a string ID to a runtime ID.
Parameters
stringID:String — (String) The ID to convert.
|
Number |
system | () | method |
public function system(callString:String):Number
Since : | CS5 |
perform a system call
Parameters
callString:String — (String) system call string
|
Number |
togglePalettes | () | method |
public function togglePalettes():void
Since : | CS5 |
Toggle palette visibility.
typeIDToCharID | () | method |
public function typeIDToCharID(typeID:Number):String
Since : | CS5 |
Converts from a runtime ID to a character ID.
Parameters
typeID:Number — (Number) The ID to convert.
|
String |
typeIDToStringID | () | method |
public function typeIDToStringID(typeID:Number):String
Since : | CS5 |
Converts from a runtime ID to a string ID.
Parameters
typeID:Number — (Number) The ID to convert.
|
String |