Adobe Smoke Alarm CS3 Manual Do Utilizador
3
Contents
JavaScript Support................................................................................................................................................................... 8
Startup Scripts........................................................................................................................................................................... 9
Executing JavaScripts from AS or VBS .............................................................................................................................. 9
Startup Scripts........................................................................................................................................................................... 9
Executing JavaScripts from AS or VBS .............................................................................................................................. 9
Containment Hierarchy .......................................................................................................................................................10
The Containment Hierarchy and the Photoshop CS3 User Interface..................................................................12
Additional Objects.................................................................................................................................................................14
Constants ..................................................................................................................................................................................14
The Containment Hierarchy and the Photoshop CS3 User Interface..................................................................12
Additional Objects.................................................................................................................................................................14
Constants ..................................................................................................................................................................................14
Creating and Running an AppleScript............................................................................................................................15
Creating and Running a VBScript.....................................................................................................................................16
Creating and Running a JavaScript .................................................................................................................................17
Creating and Running a VBScript.....................................................................................................................................16
Creating and Running a JavaScript .................................................................................................................................17
Viewing Photoshop CS3’s AppleScript Dictionary.....................................................................................................19
Viewing Photoshop CS3’s Type Library (VBS) ..............................................................................................................20
Viewing Photoshop CS3’s Type Library (VBS) ..............................................................................................................20
Targeting and Referencing the Application Object.........................................................................................................20
Creating New Objects in a Script ............................................................................................................................................21
Setting the Active Object ..........................................................................................................................................................23
Creating New Objects in a Script ............................................................................................................................................21
Setting the Active Object ..........................................................................................................................................................23
Setting the Active Document ............................................................................................................................................24
Setting the Active Layer.......................................................................................................................................................25
Setting the Active Channels...............................................................................................................................................25
Setting the Active Layer.......................................................................................................................................................25
Setting the Active Channels...............................................................................................................................................25
Opening a File with Default File Format........................................................................................................................26
Specifying File Formats to Open ......................................................................................................................................27
Specifying File Formats to Open ......................................................................................................................................27
Saving a Document .....................................................................................................................................................................29
Setting Application Preferences ............................................................................................................................................30
Allowing or Preventing Dialogs ..............................................................................................................................................31
Working with the Photoshop CS3 Object Model..............................................................................................................31
Setting Application Preferences ............................................................................................................................................30
Allowing or Preventing Dialogs ..............................................................................................................................................31
Working with the Photoshop CS3 Object Model..............................................................................................................31
Using the Application Object ............................................................................................................................................31
Using the Document Object ..............................................................................................................................................32
Working with Layer Objects ...............................................................................................................................................34
Creating an ArtLayer Object...............................................................................................................................................34
Creating a Layer Set Object ................................................................................................................................................35
Working with Layer Set Objects........................................................................................................................................37
Using the Text Item Object.................................................................................................................................................39
Working with Selection Objects .......................................................................................................................................41
Using the Document Object ..............................................................................................................................................32
Working with Layer Objects ...............................................................................................................................................34
Creating an ArtLayer Object...............................................................................................................................................34
Creating a Layer Set Object ................................................................................................................................................35
Working with Layer Set Objects........................................................................................................................................37
Using the Text Item Object.................................................................................................................................................39
Working with Selection Objects .......................................................................................................................................41