app - ff6347/extendscript GitHub Wiki
The app is the base of everything. below that you can only call something like a root level. The "scripting engine" alert($.locale). Don't worry about that. You can use this to get output in the ESTK like this:
$.writeln("Hello World")
But this is only for debugging. So the app holds documents, fonts, selection and things like this.
/**
Get he app version like this
*/
alert(app.name + " v" + app.version);
Or you could use the selection like this.
/**
You need a page and a selected item to run this script
*/
alert(app.selection[0].constructor.name)
/*
You can adress a target application like this
*/
#target indesign
alert(app.colorSettings.properties.toSource());