Adobe 65009333 - InCopy CS4 - PC Manual page 76

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

Advertisement

Events
#targetengine "session"
//Creates an event listener that will run after a new document is created.
main();
function main(){
var myEventListener = app.eventListeners.add("afterNew",
myAfterNewHandler, false);
}
function myAfterNewHandler(myEvent){
var myDocument = myEvent.parent;
main(myDocument);
function main(myDocument){
app.userName = "Adobe";
myAddXMPData(myDocument);
}
function myAddXMPData(myDocument){
with(myDocument.metadataPreferences){
}
}
}
author = "Adobe Systems";
description = "This is a sample document with XMP metadata. Created:"
+ myEvent.timeStamp + "\rby: " + app.userName;
A sample "afterNew" eventListener 76

Advertisement

Table of Contents
loading

This manual is also suitable for:

Incopy cs4

Table of Contents