Adobe 65009333 Scripting Guide - Page 18
in the Scripts Panel folder see
UPC - 883919155852
View all Adobe 65009333 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 18 highlights
Getting Started Adding features to "Hello World" 18 //Get a reference to a font. try{ //Enter the name of a font on your system, if necessary. var myFont = app.fonts.item("Arial"); } on(myError){} //Get the active document and assign the result to the variable "myDocument" var myDocument = app.documents.item(0); with(myDocument.stories.item(0)){ //Change the font, size, and paragraph alignment. try{ appliedFont = myFont; } on(myError){} justification = Justification.centerAlign; pointSize = 48; //Enter the note at the last insertion point of the story. var myNote = insertionPoints.item(-1).notes.add(); myNote.texts.item(0).contents = "This is a note." } 3. Save the text as a plain text file with the file extension .jsx in the Scripts Panel folder (see "Installing scripts" on page 7). 4. Double-click the script name in the Scripts panel to run the new script.