This content has been marked as final. Show 3 replies
Seem to have found the answer to this.1 person found this helpful
If anyone else is trying this you can do e.g.
(where utilities.js is in the same folder)
If you use the statement
InDesign will look for the library in the **current folder**.
If you didn't set this folder yourself InDesign mill use it's own location.
I think it's safer to use an absolute path.
another way to execute an external script is the Application.doScript method.
Application.doScript(script:any, language: ScriptLanguage , withArguments:Array of any):any
Executes the script in the specified language.
script: Data Type: any
The script to execute. Can accept: File or String.
language: Data Type: ScriptLanguage , Default Value: UNKNOWN
The language of the script to execute. If not specified, uses the language used to call this method. (Optional)
withArguments: Data Type: Array of any
An array of arguments to pass to the script. (Optional)