Adobe 27510753 Scripting Guide - Page 78
engine, include, includepath, the include paths are ignored. Otherwise
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 78 highlights
70 Using ExtendScript Tools and Features Adobe InDesign CS2 Scripting Guide #engine name Identifies the ExtendScript engine that runs this script. This allows other engines to refer to the scripts in this engine by importing the exported functions and variables. See the "Importing and exporting between scripts" section. #include file Use JavaScript identifier syntax for the name. Enclosing quotes are optional. For example: #engine library #engine "$lib" Includes a JavaScript source file from another location. Inserts the contents of the named file into this file at the location of this statement. The file argument is an Adobe portable file specification. See the "Specifying Paths" section. As a convention, use the file extension .jsxinc for JavaScript include files. For example: #include "../include/lib.jsxinc" To set one or more paths for the #include statement to scan, use the #includepath preprocessor directive. If the file to be included cannot be found, ExtendScript throws a run-time error. #includepath path Included source code is not shown in the debugger, so you cannot set breakpoints in it. One or more paths that the #include statement should use to locate the files to be included. The semicolon (;) separates path names. If a #include file name starts with a slash (/), it is an absolute path name, and the include paths are ignored. Otherwise, ExtendScript attempts to find the file by prefixing the file with each path set by the #includepath statement. For example: #includepath "include;../include" #include "file.jsxinc" Multiple #includepath statements are allowed; the list of paths changes each time an #includepath statement is executed. As a fallback, ExtendScript also uses the contents of the environment variable JSINCLUDE as a list of include paths. Some engines can have a predefined set of include paths. If so, the path provided by #includepath is tried before the predefined paths. If, for example, the engine has a predefined path set to predef;predef/include, the preceding example causes the following lookup sequence: l file.jsxinc: literal lookup l include/file.jsxinc: first #includepath path l ../include/file.jsxinc: second #includepath path l predef/file.jsxinc: first predefined engine path l predef/include/file.jsxinc: second predefined engine path