Adobe Smoke Alarm CS3 用户手册

下载
页码 85
Photoshop CS3
Adobe Photoshop CS3  Scripting Guide
 Scripting Photoshop CS3     20
Viewing Photoshop CS3’s Type Library (VBS)
You can use the VBA editor in Microsoft Word to display the objects and commands available for VBScript 
in Photoshop CS3.
To view the VBS object library in Microsoft Word:
1. Start Word, and then choose Tools > Macro > Visual Basic Editor
2. Choose Tools > References, and then select the Adobe Photoshop CS3 Type Library check box and 
click OK
3. Choose View > Object Browser
4. Choose Photoshop CS3 type library from the list of open libraries shown in the top-left pull-down 
menu.
5. Choose an object class to display more information abut the class.
You can also use the object browser in the Visual Basic development environment to display the objects 
and commands available for VBScript in Photoshop CS3.
To view the VBS object library in the Visual Basic development environment:
1. Start Visual Studio 2005, or Visual Basic.
2. Select View > Object Browser.
3. In the Browse drop-down box, select Edit Custom Component Set.
4. On the COM tab, find “Adobe Photoshop CS3 Object Library”. Select it. 
5. Click Add. The selected library appears in the “Selected Projects and Components” portion of the 
window.
6. Click OK.
7. Now the Photoshop CS3 Library is loaded into the object browser. Click on the plus sign next to the 
Photoshop Library icon. 
8. Click on the plus sign next to the Photoshop objects icon.
9. The objects defined in the Photoshop CS3 library are listed. You can select one to display more 
information about the class.
Targeting and Referencing the Application Object
Because you run your AppleScript and VBScript scripts from outside the Photoshop CS3 application, the 
first thing your script should do is indicate that the commands be executed in Photoshop CS3.
Note:
In JavaScript, you do not need to target the 
Application
 object because you open the scripts from 
the Photoshop CS3 application itself. (See 
.) 
AS
To target Photoshop CS3 in AppleScript, you must enclosing your script in the following statements:
tell application "Adobe Photoshop CS3"