Adobe 23101764 Scripting Guide - Page 54
Advanced AppleScript
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 54 highlights
Scripting Photoshop 3 Advanced Scripting To finish up, set application preferences back to their original values. docRef.Selection.Select Array(Array(docWidthInPixels / 2, 0), _ Array(docWidthInPixels, 0), _ Array(docWidthInPixels, docHeightInPixels), _ Array(docWidthInPixels / 2, docHeightInPixels), _ Array(docWidthInPixels / 2, 0)) newTextLayer.ApplyMotionBlur 45, 5 docRef.Selection.Deselect app.Preferences.RulerUnits = startRulerUnits app.Preferences.TypeUnits = startTypeUnits app.DisplayDialogs = startDisplayDialogs This code snippet removes the "marching ants" and blurs the text on the right side of the document. 3.4.3 Advanced AppleScript The following AppleScript code sample is broken down into four sections, the first of which deals with configuring document preferences. Document Preferences In this code segment, a Photoshop Application object is activated. Default configuration settings for the application are saved into variables so that they can be restored later when the script completes. These are the default configurations you most probably set up using the File/Edit/Preferences dialog when you initially installed and configured Photoshop. The script goes on to define new preferences for rulers and units and sets these to inches and pixels, respectively. Dialog modes is set to "never" so that the script runs without user intervention. Users will not, in other words, be required to press "OK" each time the script generates a new dialog for display. Photoshop CS Scripting Guide 50