Adobe 23101764 Scripting Guide - Page 44
Hello Word Script
UPC - 718659340025
View all Adobe 23101764 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 44 highlights
Scripting Photoshop 3 Your first Photoshop script // Hello Word Script // Remember current unit settings and then set units to // the value expected by this script var originalUnit = preferences.rulerUnits; preferences.rulerUnits = Units.INCHES; // Create a new 4x4 inch document and assign it to a variable var docRef = app.documents.add( 4, 4 ); // Create a new art layer containing text var artLayerRef = docRef.artLayers.add(); artLayerRef.kind = LayerKind.TEXT; // Set the contents of the text layer. var textItemRef = artLayerRef.textItem; textItemRef.contents = "Hello, World!"; // Release references docRef = null; artLayerRef = null; textItemRef = null; // Restore original ruler unit setting app.preferences.rulerUnits = originalUnit; Photoshop CS Scripting Guide 40