Руководство ПользователяСодержаниеContents3Introduction5About this manual5Conventions in this guide5What is scripting?6Why use scripting?6Why use scripts instead of Actions?6System requirements7Mac OS7AppleScript Requirements7JavaScript Requirements (Mac OS)7Windows7JavaScript8Choosing a scripting language8Cross-platform scripts8Scripts that control multiple applications9New Features9Scripting basics10Introducing Objects10Writing Script Statements11Syntax11Object Model Concepts11Containment Hierarchy12Applying the Concept to Photoshop CS212Photoshop CS2’s Object Model12Object Elements and Collections13Indexes or Indices14Referring to an Object in an Element or Collection14Object References15Using Commands and Methods16Commands and Command Properties16Methods and Arguments17Using Variables17Why Use Variables?18Data Contained in Variables18Creating Variables and Assigning Values18Naming Variables21Using Object Properties22Understanding and Finding Constants23Understanding Object Classes and Inheritance23Using Arrays23Documenting Scripts24Comment Syntax24Using Long Script Lines25Creating a Sample Hello World Script25Creating and Running an AppleScript26Creating and Running a VBScript27Creating and Running a JavaScript28What’s Next29Using Operators29Comparison Operators29Using Conditional Statements30Loops30Simple Loops30More Complex Loops31Using Subroutines, Handlers and Functions33Executing JavaScripts from AS or VBS35Passing AS or VBS Arguments to JavaScript35Testing and Troubleshooting36AppleScript Debugging36VBScript Debugging37JavaScript Debugging37Error Handling37Bibliography38Scripting Photoshop CS240Viewing Photoshop CS2 Objects, Commands and Methods40Viewing Photoshop CS2’s AppleScript Dictionary40Viewing Photoshop CS2’s Type Library (VBS)40Targeting and Referencing the Application Object41Creating New Objects in a Script41Setting the Active Object43Setting the Active Document44Setting the Active Layer45Setting the Active Channels45Opening a Document46Specifying File Formats to Open46Saving a Document48Setting Application Preferences50Allowing or Preventing Dialogs50Working with the Photoshop CS2 Object Model51Using the Application Object51Using the Document Object52Manipulating a Document Object52Working with Layer Objects53Creating an ArtLayer Object54Referencing ArtLayer Objects55Working with Layer Set Objects56Linking Layer Objects56AS56JS57Applying Styles to Layers57Using the Text Item Object58Determining a Layer’s Kind58Adding and Manipulating Text in a Text Item Object59Working with Selection Objects59Creating and Defining a Selection60Stroking the Selection Border61Inverting Selections61Expanding, Contracting and Feathering Selections61Filling a Selection62Loading and Storing Selections63Working with Channel Objects63Changing Channel Types63Using the Document Info Object64Using History State Objects64Using Notifier Objects65Using the PathItem Object66Working with Color Objects67Solid Color Classes68Using Hex Values68Getting and Converting Colors68Comparing Colors69Getting a Web Safe Color69Working with Filters69JS70Other Filters70Understanding Clipboard Interaction70Using the Copy and Paste Commands/Methods71Using the Copy Merged Command/Method71Working with Units72Unit Values72Special Unit Value Types72AppleScript Unit Considerations73Using Unit Values in Calculations73Unit Value Usage73Setting Ruler And Type Units in a Script75Sample Workflow Automation JavaScripts75Advanced Scripting76Working with Document Preferences76Applying Color to a Text Item80Applying a Wave Filter82Defining the Area of a Selection Object83Applying a MotionBlur Filter86Index89Размер: 717,6 КБСтраницы: 91Язык: EnglishПросмотреть