Adobe Smoke Alarm CS3 Manual De Usuario

Descargar
Página de 85
Photoshop CS3
Adobe Photoshop CS3  Scripting Guide
 Scripting Photoshop CS3     32
You use the properties and commands of the 
Application
 object to work with Photoshop CS3 
functionality and objects such as the following:
Global Photoshop CS3 settings or preferences, such as unit values or color settings. See 
.
Documents—You can add or open documents and set the active document. 
 and 
.
Actions—You can execute actions created either via scripting or using the Actions palette in the 
Photoshop CS3 application. See 
.
You can use 
Application
 object properties to get information such as the following:
A list of fonts installed on the system.
AS: 
Set theFonts to fonts
Note:
In AppleScript, fonts is a separate collection, and does not require a reference to the application 
object to retrieve it.
VBS: 
Set fontsInstalled = AppRef.Fonts 
JS: 
var fontsInstalled = app.fonts
The amount of unused memory available to Adobe Photoshop CS3, using the 
free memory 
(FreeMemory/freeMemory)
 property of the 
Application
 object.
The location of the Preferences folder, using the 
preferences folder 
(PreferencesFolder/preferencesFolder)
 property of the Application object.
For further information, look up the properties of the 
Application
 object in the reference manual or the 
object browser of the language you are using.
Using the Document Object
The 
Document
 object can represent any open document in Photoshop CS3. You can think of a 
Document
 
object as a file; you can also think of it as a canvas. You work with the 
Document
 object to do the following:
Access script objects contained in the 
Document
 object, such as 
ArtLayer
 or 
Channel
 objects. See 
 for more information. 
Manipulate a specific 
Document
 object, using commands or methods. For example, you could crop, 
rotate or flip the canvas, resize the image or canvas, and trim the image. See 
 for a demonstration. 
Get the active layer. See 
Save the current document. See 
.
Copy and paste within the active document or between different documents. See 
.
Manipulating a Document Object
The following examples demonstrate how to do the following:
Save the existing ruler unit preferences, and set ruler units to inches
Open an existing file as a document (using file Ducky.tif )
Change the size of the image to 4 inches wide and 4 inches high.
Change the size of the document window (or canvas) to 4 inches high and 4 inches wide.
Trim the top and bottom of the image.