Scripting Adobe Photoshop CS2
- Viewing Photoshop CS2 objects, commands, and methods
- Creating new objects in a script
- Setting the active object
- Opening a document
- Saving a document
- Setting application preferences
- Suppressing dialog boxes
- Working with the Adobe Photoshop CS2 Object Model
- Working with color objects
- Working with filters
- Understanding clipboard interaction
- Working with units
- Sample workflow automation JavaScripts
- Advanced scripting
This chapter demonstrates several techniques for creating scripts to use specifically with Adobe Photoshop CS2.
More importantly, you will learn how to use the Adobe Photoshop CS2 scripting references to find the objects, classes, properties, methods, and even some values (called constants or enumerations) you can use to create JavaScripts for Adobe Photoshop CS2.
Viewing Photoshop CS2 objects, commands, and methods
In JavaScript, all properties and methods of the application are accessible without any qualification. You can reference the application as part of the containment hierarchy or leave it out, whichever makes your scripts easier for you to read. The following statements are equivalent:
var docRef = app.documents[1]
and
var docRef=documents[1]