Adobe 65009333 - InCopy CS4 - PC Manual page 18

Scripting guide: javascript
Hide thumbs Also See for 65009333 - InCopy CS4 - PC:
Table of Contents

Advertisement

Getting Started
//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{
}
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
scripts" on page
4. Double-click the script name in the Scripts panel to run the new script.
appliedFont = myFont;
7).
Adding features to "Hello World" 18
in the Scripts Panel folder (see
.jsx
"Installing

Advertisement

Table of Contents
loading

This manual is also suitable for:

Incopy cs4

Table of Contents