Adobe 65014293 Scripting Guide - Page 22
Viewing Photoshop’s type library (VBS), Targeting and Referencing the Application Object
UPC - 883919153544
View all Adobe 65014293 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 22 highlights
CHAPTER 3: Scripting Photoshop Targeting and Referencing the Application Object 22 NOTE: The Photoshop AppleScript Dictionary does not display the complete list of open and save formats. Viewing Photoshop's type library (VBS) You can use the VBA editor in Microsoft Word to display the objects and commands available for VBScript in Photoshop. 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 Type Library check box and click OK. 3. Choose View > Object Browser. 4. Choose Photoshop CS4 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. 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 CS4 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 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 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 application, the first thing your script should do is indicate that the commands be executed in Photoshop. NOTE: In JavaScript, you do not need to target the Application object because you open the scripts from the Photoshop application itself. (See "Creating and running a JavaScript" on page 19.)