Adobe® Bridge® Official JavaScript Reference

Book description

While creative professionals spend much of their time working on illustrations, photo-editing, and laying out pages, many parts of their jobs are anything BUT creative. Too often, they spend their time doing repetitive, time-wasting tasks such as placing and replacing images, correcting errors in text, cutting and pasting, and preparing files for printing. Yet virtually every repetitive or time-consuming task that creative professionals have to do in the Adobe Creative Suite can be streamlined with the help of a script.

Adobe Bridge is the new navigational center built into Adobe Creative Suite 2 software, giving users instant access to their Adobe Creative Suite project files, applications, and settings. And like all of Adobe Creative Suite 2’s components, Adobe Bridge has built-in JavaScript support.

Now available in print for the first time, this scripting reference provides the information experienced JavaScript users need to create scripts for Adobe Bridge, whether you’re looking to create a custom file browsing view, need to export metadata  from selected thumbnails automatically, or want to create custom navigational bars or dialog boxes that help streamline your company’s production workflow. If you’re familiar with JavaScript,, C and C++ programming, and the Adobe Creative Suite, this reference will show you how to use the scripting API to extend and manipulate Adobe Bridge.

Table of contents

  1. Copyright
  2. Welcome
    1. About This Book
      1. Advisory of previous publication
      2. Who should read this book
      3. What is in this book
      4. Document conventions
        1. Typographical conventions
        2. JavaScript conventions
      5. Where to go for more information
  3. 1. Scripting Bridge
    1. Scripting Overview
      1. Executing scripts
      2. Communicating with other applications
    2. The Bridge Document Object Model
      1. The application and documents
      2. Thumbnails in documents
        1. Thumbnails as node references
        2. Using and accessing thumbnails
      3. User-interface objects
        1. Navigation bars
        2. Dialogs
        3. Menus
      4. Events
      5. Application preferences
    3. The Bridge DOM and the Bridge Browser Window
  4. 2. Event Handling and Script-Defined Browse Schemes
    1. Event Handling in Bridge
      1. Defining event handlers
      2. Registering event handlers
      3. Event handling examples
        1. Example: Separate handlers for separate events
        2. Example: One handler for all document events
        3. Example: Canceling a quit operation using app close
        4. Example: Adding a service to Bridge using document create
      4. User-interface events
    2. Script-Defined Browse Schemes
      1. Defining and registering a browse scheme
  5. 3. Creating a User Interface
    1. User Interface Options for Scripts
      1. Navigation bars
      2. Dialogs boxes
      3. Content pane
    2. ScriptUI User Interfaces
      1. Displaying ScriptUI dialogs
      2. Displaying ScriptUI elements in a navigation bar
        1. Example: Adding a path bar
    3. Displaying HTML in Bridge
      1. Defining callbacks for HTML scripts
      2. Executing script functions defined on HTML UI pages
    4. Displaying HTML in Bridge Dialogs
      1. Communicating with Bridge from dialog JavaScript
      2. Using callbacks in an HTML dialog
        1. Code in the HTML file
        2. Code in the Bridge script
        3. Calling functions defined in an HTML dialog
    5. Displaying HTML in a Navigation Bar
      1. Using callbacks from an HTML navigation bar
        1. Code in the Bridge script
        2. Code in the HTML file
      2. Calling functions defined in an HTML navigation bar
        1. Code in the Bridge script
        2. Code in the HTML file
    6. Displaying HTML in the Content Pane
      1. Callback example: Requesting specific metadata value for a file
        1. Code in the Bridge DOM script
        2. Code in the HTML file testUI.html
    7. Passing Complex Values in Remote Calls
      1. Passing an object from Bridge to HTML/JavaScript
        1. Code in the Bridge DOM script
        2. Code in the HTML page
    8. Scheduling Tasks from Callbacks
      1. Scheduling a remote function execution
      2. Bridge Script
        1. HTML code
  6. 4. Using File and Folder Objects
    1. Overview
    2. Specifying Paths
      1. Absolute and relative path names
      2. Character interpretation in paths
      3. The home directory
      4. Volume and drive names
        1. Mac OS volumes
        2. Windows drives
      5. Aliases
      6. Portability issues
    3. Unicode I/O
    4. File Error Handling
  7. 5. Using ScriptUI
    1. Overview
    2. ScriptUI Programming Model
      1. Creating a window
      2. Container elements
      3. Window layout
      4. Adding elements to containers
      5. Creation properties
      6. Accessing child elements
      7. Removing elements
      8. Types of controls
        1. Containers
      9. User-interface controls
      10. Displaying icons
      11. Prompts and alerts
      12. Modal dialogs
      13. Creating and using modal dialogs
      14. Dismissing a modal dialog
      15. Default and cancel elements
    3. Resource Specifications
    4. Defining Behavior for Controls with Event Callbacks
      1. Defining event handler functions
      2. Simulating user events
    5. Automatic Layout
      1. Default layout behavior
      2. Automatic layout properties
        1. Container orientation
        2. Aligning children
        3. Setting margins
        4. Spacing between children
        5. Determining a preferred size
      3. Creating more complex arrangements
        1. Creating dynamic content
      4. Custom layout manager example
      5. The AutoLayoutManager algorithm
      6. Automatic layout restrictions
    6. Example Scripts
      1. Alert box builder
        1. Resource specification example
    7. Localization in ScriptUI Objects
      1. Variable values in localized strings
      2. Enabling automatic localization
  8. 6. Bridge DOM Object Reference
    1. App Object
      1. App object properties
      2. App object functions
    2. Dialog Object
      1. Dialog object constructor
      2. Dialog object properties
      3. Dialog object functions
    3. Document Object
      1. Document object properties
      2. Document object functions
    4. Event Object
      1. Event object properties
      2. Event object types
        1. App events
        2. Document events
        3. Thumbnail events
        4. PreferencesDialog events
    5. Favorites Object
      1. Favorites object properties
      2. Favorites object functions
    6. Metadata Object
      1. Metadata object properties
        1. Examples
      2. Metadata object functions
    7. NavBar Object
      1. NavBar object properties
      2. NavBar object functions
    8. Preferences Object
      1. Preferences object properties
      2. Preferences object functions
    9. PreferencesDialog Object
      1. PreferencesDialog object functions
    10. Thumbnail Object
      1. Thumbnail object constructor
        1. Node specifiers
          1. Examples of thumbnail creation
        2. Multiple references to the same node
      2. Thumbnail object properties
      3. Thumbnail object functions
  9. 7. File and Folder Object Reference
    1. Overview
    2. File Object
      1. File object constructors
      2. File class properties
      3. File class functions
      4. File object properties
      5. File object functions
    3. Folder Object
      1. Folder object constructors
      2. Folder class properties
      3. Folder class functions
      4. Folder object properties
      5. Folder object functions
    4. File and Folder Error Messages
    5. File and Folder Supported Encoding Names
      1. Additional encodings
        1. Common encoding names
        2. Additional Windows encoding names
        3. Additional Mac OS encoding names
        4. UNIX encodings
  10. 8. ScriptUI Object Reference
    1. Overview
    2. Window Class
      1. Window class properties
      2. Window class functions
    3. Window Object
      1. Window object constructor
      2. Window object properties
      3. Container properties
      4. Window object functions
      5. Window event-handling callbacks
    4. Control Objects
      1. Control object constructors
      2. Control types and creation parameters
      3. Control object properties
      4. Control object functions
      5. Control event-handling callbacks
    5. Size and Location Objects
    6. LayoutManager Object
      1. AutoLayoutManager object constructor
      2. AutoLayoutManager object properties
      3. AutoLayoutManager object functions
    7. MenuElement Object
      1. MenuElement class functions
        1. Creating new menu elements
          1. Example: Adding a menu and command to the menubar
          2. Example: Adding a command to a context menu
      2. MenuElement object properties
      3. Bridge menu and command identifiers
        1. Bridge menu identifiers
        2. Bridge submenu and command identifiers
          1. Bridge menu commands (Mac OS only)
          2. File menu commands
          3. Edit menu commands
          4. Tools menu commands
          5. Label menu commands
          6. View menu commands
          7. Window menu commands
          8. Help menu commands
          9. Context menu commands
  11. 9. Interapplication Communication with Scripts
    1. Cross-DOM Functions
    2. Cross-DOM API Reference
    3. Application-Specific Exported Functions
    4. Communicating Through Interapplication Messages
      1. Sending messages
        1. Step 1: Check that the target application is installed
        2. Step 2: Construct a message object
        3. Step 3: Specify how to handle a response
        4. Step 4: Send the message
      2. Receiving messages
      3. Handling unsolicited messages
        1. Message handling examples
      4. Handling responses from the message target
        1. Example: Receiving a simple response
        2. Example: Handling any error
        3. Example: Handling expected errors and responses
        4. Setting up a target to send multiple responses
        5. Example: Setting up a sender to receive multiple responses
      5. Passing values between applications
        1. Passing simple types
        2. Passing complex types
          1. Passing an array with toSource and eval
          2. Passing an object with toSource and eval
          3. Passing a DOM object
    5. Interapplication Message API Reference
      1. BridgeTalk class
        1. BridgeTalk class properties
        2. BridgeTalk class functions
      2. BridgeTalk message object
        1. BridgeTalk message object constructor
        2. BridgeTalk message object properties
        3. BridgeTalk message object callbacks
        4. BridgeTalk message object functions
      3. Messaging error codes
    6. Sample Workflow Automation Scripts
  12. 10. ExtendScript Tools and Features
    1. The ExtendScript Toolkit
      1. Configuring the Toolkit window
      2. Selecting a debugging target
      3. Selecting scripts
      4. Tracking data
      5. The JavaScript console
      6. The call stack
      7. The Script Editor
        1. Mouse navigation and selection
        2. Keyboard navigation and selection
        3. Syntax checking
      8. Debugging in the Toolkit
        1. Evaluation in help tips
        2. Controlling code execution
        3. Visual indication of execution states
        4. Setting breakpoints
        5. Breakpoint icons
        6. The Breakpoints tab
      9. Profiling
    2. Dollar ($) Object
      1. Dollar ($) object properties
      2. Dollar ($) object functions
        1. Object statistics
    3. ExtendScript Reflection Interface
      1. Reflection object
        1. Reflection object properties
        2. Reflection object functions
          1. Examples
      2. ReflectionInfo object
        1. ReflectionInfo object properties
    4. Localizing ExtendScript Strings
      1. Variable values in localized strings
      2. Enabling automatic localization
      3. Locale names
        1. How locale names are resolved
      4. Testing localization
      5. Global localize function
    5. User Notification Helper Functions
      1. Global alert function
        1. Examples
      2. Global confirm function
        1. Examples
      3. Global prompt function
        1. Examples
    6. Specifying Measurement Values
      1. UnitValue object
        1. UnitValue object constructor
        2. UnitValue object properties
        3. UnitValue object functions
      2. Converting pixel and percentage values
      3. Computing with unit values
    7. Modular Programming Support
      1. Preprocessor directives
      2. Importing and exporting between scripts
    8. Operator Overloading
    9. Application and Namespace Specifiers
      1. Application specifiers
      2. Namespace specifiers
    10. Script Locations and Checking Application Installation

Product information

  • Title: Adobe® Bridge® Official JavaScript Reference
  • Author(s): Adobe Systems Inc.
  • Release date: October 2005
  • Publisher(s): Adobe Press
  • ISBN: 9780321409720