Adobe 23101764 Scripting Guide - Page 51
app.Preferences.RulerUnits = Photoshop.PsUnits.psInches
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 51 highlights
Scripting Photoshop 3 Advanced Scripting app.Preferences.RulerUnits = Photoshop.PsUnits.psInches app.Preferences.TypeUnits =_ Photoshop.PsTypeUnits.psTypePixels app.DisplayDialogs =_ Photoshop.PsDialogModes.psDisplayNoDialogs docWidthInInches = 4 docHeightInInches = 2 resolution = 72 helloWorldStr = "Hello, World!" If app.Documents.Count = 0 Then app.Documents.Add docWidthInInches, docHeightInInches,_ resolution, helloWorldStr End If This code produces the blank document displayed below. Displaying Colored Text Having generated a default document, you can now display colored text. To do so, first set a local reference to the current document. Then create a SolidColor object and assign RGB color values to it. You are now ready to create an art layer of type psTextLayer. NOTE: For a complete listing of all Visual Basic properties, methods and constants (such as psTextLayer), please refer to the Visual Basic Reference Guide, included as a separate document with Photoshop CS. Next, set the text, position, size and color of the text layer. The content of the text layer is the string variable helloWorldStr declared in the previous section. Photoshop CS Scripting Guide 47