.. _Application: ================================================ Application ================================================ Description ----------- The Adobe Photoshop application object, which contains all other Adobe Photoshop objects. This is the root of the object model, and provides access to all other objects. To access the properties and methods, you can use the pre-defined global variable app. For example: var currentDoc = app.activeDocument; Properties ^^^^^^^^^^ +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`activeDocument` readonly | The frontmost document. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`backgroundColor` readonly | The default background color (used to paint, fill, and stroke selections). | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`build` readonly | The build number of Adobe Photoshop application. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`colorSettings` readonly | The name of the selected color setting's set. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`currentTool` readonly | Name of the current tool. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`displayDialogs` readonly | The dialog mode for the document, which indicates whether or not Photoshop displays dialogs when the script runs. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`documents` readonly | The collection of open documents. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`fonts` readonly | The fonts installed on this system. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`foregroundColor` readonly | The default foreground color (used to paint, fill, and stroke selections). | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`freeMemory` readonly | The amount of unused memory available to Photoshop. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`locale` readonly | The language locale of the application. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`macintoshFileTypes` readonly | A list of the image file types Photoshop can open. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`measurementLog` readonly | The log of measurements taken. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`name` readonly | The application name. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`notifiers` readonly | The notifiers currently configured (in the Scripts Events Manager menu in the application). | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`notifiersEnabled` readonly | If true, notifiers are enabled. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`parent` readonly | The object's container. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`path` readonly | The full path of the location of the Adobe Photoshop application. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`playbackDisplayDialogs` readonly | The dialog mode for playback mode, which indicates whether or not Photoshop displays dialogs in playback mode. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`playbackParameters` readonly | The playback options, which indicate the speed at which Photoshop plays actions. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`preferences` readonly | The application preference settings (equivalent to selecting Edit > Preferences in the Adobe Photoshop application in Windows or Photoshop > Preferences in Mac OS). | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`preferencesFolder` readonly | The full path to the preferences folder. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`recentFiles` readonly | Files in the Recent Files list. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`scriptingBuildDate` readonly | The build date of the scripting interface. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`scriptingVersion` readonly | The version of the Scripting interface. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`systemInformation` readonly | System information of the host application and machine. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`typename` readonly | The class name of the object. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`version` readonly | The version of Adobe Photoshop application that you are running. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`windowsFileTypes` readonly | A list of the image file extensions Photoshop can open. | +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Methods ^^^^^^^ +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`batch` readonly | Runs the batch automation routine; analogous to using the Batch command in Photoshop. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`beep` readonly | Alerts the user. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bringToFront` readonly | Makes Photoshop the active application. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`changeProgressText` readonly | Changes the text that appears in the progress window. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`charIDToTypeID` readonly | Converts from a four character code to a runtime ID. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`doAction` readonly | Plays the specified action from the Actions palette. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`doForcedProgress` readonly | 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. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`doProgress` readonly | Performs a task with a progress bar. Other progress APIs must be called periodically to update the progress bar and allow cancelling. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`doProgressSegmentTask` readonly | 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. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`doProgressSubTask` readonly | 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. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`doProgressTask` readonly | Sections off a portion of the unused progress bar for execution of a subtask. Returns false on cancel. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`eraseCustomOptions` readonly | Removes the specified user objects from the Photoshop registry. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`executeAction` readonly | Plays an ActionManager event. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`executeActionGet` readonly | Obtains an action descriptor. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`featureEnabled` readonly | If true, the specified feature is enabled. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`getCustomOptions` readonly | Retrieves user objects from the Photoshop registry for the ID with value key. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`isQuicktimeAvailable` readonly | Returns true if Quicktime is installed. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`load` readonly | Loads a support document. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`makeContactSheet` readonly | Creates a contact sheet from multiple files. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`makePDFPresentation` readonly | Creates a PDF presentation file. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`makePhotoGallery` readonly | DEPRECATED. Creates a web photo gallery. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`makePhotomerge` readonly | DEPRECATED. Merges multiple files into one, user interaction required. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`makePicturePackage` readonly | Creates a picture package from multiple files. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`open` readonly | Opens the specified document file(s). | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`openDialog` readonly | Uses the Photoshop open dialog to select files. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`purge` readonly | Purges one or more caches. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`putCustomOptions` readonly | Save user objects in the Photoshop registry. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`refresh` readonly | Pauses the script until the application refreshes. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`refreshFonts` readonly | Force the font list to get refreshed. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`runMenuItem` readonly | Run a menu item. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`showColorPicker` readonly | Display color picker dialog. Returns false if dialog is cancelled, true otherwise. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`stringIDToTypeID` readonly | Converts from a string ID to a runtime ID. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`system` readonly | Perform a system call. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`togglePalettes` readonly | Toggle palette visibility. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`toolSupportsBrushes` readonly | Check if the specified tool supports brushes. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`typeIDToCharID` readonly | Converts from a runtime ID to a character ID. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`typeIDToStringID` readonly | Converts from a runtime ID to a string ID. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`updateProgress` readonly | Updates the progress bar started by doProgress. Use for manual non-task based progress updating. Returns false on cancel. | +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. container:: hide .. toctree:: :hidden: :maxdepth: 1 Application/parent.rst Application/typename.rst Application/colorSettings.rst Application/activeDocument.rst Application/name.rst Application/path.rst Application/preferences.rst Application/scriptingVersion.rst Application/freeMemory.rst Application/version.rst Application/displayDialogs.rst Application/foregroundColor.rst Application/backgroundColor.rst Application/playbackParameters.rst Application/playbackDisplayDialogs.rst Application/notifiersEnabled.rst Application/windowsFileTypes.rst Application/macintoshFileTypes.rst Application/preferencesFolder.rst Application/locale.rst Application/documents.rst Application/fonts.rst Application/notifiers.rst Application/scriptingBuildDate.rst Application/recentFiles.rst Application/build.rst Application/systemInformation.rst Application/measurementLog.rst Application/currentTool.rst Application/toolSupportsBrushes.rst Application/doProgress.rst Application/doForcedProgress.rst Application/changeProgressText.rst Application/doProgressTask.rst Application/doProgressSegmentTask.rst Application/doProgressSubTask.rst Application/updateProgress.rst Application/togglePalettes.rst Application/doAction.rst Application/load.rst Application/open.rst Application/purge.rst Application/makePhotoGallery.rst Application/makePDFPresentation.rst Application/makePhotomerge.rst Application/makeContactSheet.rst Application/makePicturePackage.rst Application/batch.rst Application/bringToFront.rst Application/refresh.rst Application/refreshFonts.rst Application/putCustomOptions.rst Application/getCustomOptions.rst Application/eraseCustomOptions.rst Application/featureEnabled.rst Application/openDialog.rst Application/runMenuItem.rst Application/system.rst Application/executeAction.rst Application/executeActionGet.rst Application/stringIDToTypeID.rst Application/typeIDToStringID.rst Application/charIDToTypeID.rst Application/typeIDToCharID.rst Application/beep.rst Application/isQuicktimeAvailable.rst Application/showColorPicker.rst