![]() | InDesign SDK 20.5 |

Public Types | |
| enum | { kDefaultIID = IID_ISCRIPTUTILS } |
Public Member Functions | |
| virtual IScript * | QueryApplicationScript () const =0 |
| virtual IScriptInfoManager * | QueryScriptInfoManager (const RequestContext &context) const =0 |
| virtual IScriptRequestHandler * | QueryScriptRequestHandler (const RequestContext &context) const =0 |
| virtual void | GetScriptManagers (ScriptManagerList &mgrs) const =0 |
| virtual IScriptManager * | QueryScriptManager (ClassID boss) const =0 |
| virtual IScriptRunner * | QueryScriptRunner (const IDFile &) const =0 |
| virtual bool16 | IsScriptActive ()=0 |
| virtual bool16 | IsINX (const RequestContext &context)=0 |
| virtual bool16 | IsINX ()=0 |
| virtual bool16 | IsINXTraditional (const RequestContext &context)=0 |
| virtual bool16 | IsINXExpanded (const RequestContext &context)=0 |
| virtual bool16 | IsINXExport (const RequestContext &context)=0 |
| virtual PMString | GetScriptID (const ScriptID &scriptID)=0 |
| virtual IScript * | CreateProxyScriptObject (const RequestContext &context, const ClassID &classID, const ScriptID &objectID, const IPMUnknown *parent, int32 index=0)=0 |
| virtual void | ReleaseAllObjectsInDatabase (IDataBase *db) const =0 |
| virtual IWorkspace * | QueryWorkspaceFromScript (const IScript *script, const RequestContext &context)=0 |
| virtual IDocument * | QueryDocumentFromScript (const IScript *script, const RequestContext &context)=0 |
| virtual ErrorCode | ExtractInsertionLocation (IScript *inScript, IScriptRequestData *inData, const ScriptID &objectType, ScriptID &outLocation, InterfacePtr< IScript > &outScript)=0 |
| virtual ErrorCode | GetMoveLocation (const IScriptRequestData *inData, ScriptID &outLocation, InterfacePtr< IScript > &outScript)=0 |
| virtual bool16 | IsNothing (const ScriptData &scriptData)=0 |
| virtual ErrorCode | GenerateSpecifier (const EngineContext &context, const IScript *object, PMString &specifier, SpecifierForm form=kFormDefault)=0 |
| virtual ErrorCode | GenerateSpecifier (const EngineContext &context, const IScript *object, PMString &workSpaceSpecifier, PMString &objectSpecifier, SpecifierForm form=kFormDefault)=0 |
| virtual ErrorCode | GenerateListSpecifier (const EngineContext &context, const ScriptList &objects, PMString &specifier, SpecifierForm form=kFormDefault)=0 |
| virtual ErrorCode | GenerateRangeSpecifier (const EngineContext &context, const PMString &fromSpecifier, const PMString &toSpecifier, PMString &specifier)=0 |
| virtual ErrorCode | AppendSpecifier (const EngineContext &context, const ScriptInfo::ObjectScriptElement *objectScriptElement, const ScriptObject &scriptObject, PMString &specifier)=0 |
| virtual ErrorCode | ResolveSpecifier (const EngineContext &context, const PMString &specifier, ScriptList &resolvedObjects)=0 |
| virtual ErrorCode | ResolveSpecifier (const EngineContext &context, const PMString &workSpaceSpecifier, const PMString &objectSpecifier, ScriptList &resolvedObjects)=0 |
| virtual const ObjectScriptElement * | GetCommonBaseInfo (const ObjectScriptElement *si1, const ObjectScriptElement *si2) const =0 |
| virtual ErrorCode | GetScriptingSupportFolder (const RequestContext &context, IDFile &outFolder) const =0 |
| virtual void | AppendDirectoryForDOMVersion (const RequestContext &context, IDFile &sysFile) const =0 |
| virtual ErrorCode | SetScriptingTag (const ScriptList &scriptList, const EngineContext &context, const IScriptLabel::ScriptLabelValue &label, const IScriptLabel::ScriptLabelKey &key=IScriptLabel::kDefaultScriptLabelKey) const =0 |
| virtual ErrorCode | SetScriptingTags (const ScriptList &scriptList, const EngineContext &context, const IScriptLabel::ScriptLabelKeyValueList &labels, bool16 replaceExistingLabels=kFalse) const =0 |
| virtual ErrorCode | GetScriptsFolder (IDFile &scriptsFolder, bool16 resolveAlias) const =0 |
| virtual ErrorCode | ExtractVersion (IScriptRequestData *data, ScriptVersion &internalVersion) const =0 |
| virtual ErrorCode | DispatchScriptRunner (IScriptRunner *scriptRunner, const ScriptData &script, const ScriptRecordData &arguments, ScriptData &result, PMString &errorString, const bool16 showErrorAlert, const bool16 invokeDebugger=kFalse, const RunScriptParams::UndoMode undoMode=RunScriptParams::kUndoScriptRequest, const PMString &undoName=PMString(), const ScriptVersion &domVersion=ScriptVersion()) const =0 |
| virtual void | ClearScriptProviders () const =0 |
| virtual ErrorCode | SetAppScriptPrefs (bool16 redraw) const =0 |
| virtual bool16 | TranslateKeyStringFromScriptClient (PMString &s) const =0 |
| virtual void | DisableIdleProcessingDuringScripts ()=0 |
| virtual void | EnableIdleProcessingDuringScripts ()=0 |
| virtual bool16 | IsIdleProcessingEnabledDuringScripts () const =0 |
| virtual ErrorCode | DispatchScriptRunner (IScriptRunner *scriptRunner, const ScriptData &script, bool16 evalStringAsFilePath, const ScriptRecordData &arguments, ScriptData &result, PMString &errorString, const bool16 showErrorAlert, const bool16 invokeDebugger=kFalse, const RunScriptParams::UndoMode undoMode=RunScriptParams::kUndoScriptRequest, const PMString &undoName=PMString(), const ScriptVersion &domVersion=ScriptVersion()) const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
| pure virtual |
Appends the folder in which scripting resources such as VB typelibs, AETE resources are stored.
| &sysFile | IDFile of scripting support folder to append to |
| pure virtual |
Append the specifier for a scripting object to an existing specifier.
| context | IN the request context |
| objectScriptElement | IN an ObjectScriptElement describing the object |
| scriptObject | IN a ScriptObject describing the specific instance of the object |
| specifier | IN/OUT the specifier onto which to append |
| pure virtual |
Clear the script provider cache. Call this if you are implementing your own script manager when the active script state changes.
| pure virtual |
Create a proxy script object
| pure virtual |
Turns off idle processing during scripting. When idle processing is disabled, scheduled command will NOT be executed, idle task handlers will NOT be executed, and no user cancel events will be detected. Note: Must be paired with EnableIdleProcessingDuringScripts() call. Given the effect on command processing, use this API with extreme caution.
| pure virtual |
Dispatch a script to the appropriate script runner.
| scriptRunner | is the desired script runner to use to execute the script (or nil if not known) IN |
| script | is the script to execute (may be a String, a File, or a Function) IN |
| arguments | is used to pass arguments to the script IN |
| result | is the return value OUT |
| errorString | is the error string OUT |
| showErrorAlert | if kTrue show an error alert if an error occurs IN |
| invokeDebugger | indicates whether to load script into debugger for execution IN |
| undoMode | indicates how to handle undo for document changes made by the script IN |
| undoName | is the name for the undo step in single undo step mode IN |
| domVersion | is the desired version of the DOM in which to execute the script. For script files, defaults to the version of the DOM corresponding to the current version of the application (unless the file is in a "Version X.X Folder"). Ignored for text scripts, which use the version of the DOM currently set. Ignored for function callbacks, which use the version of the DOM in the function's context. |
| pure virtual |
INTERNAL USE ONLY Dispatch a script to the appropriate script runner.
| scriptRunner | is the desired script runner to use to execute the script (or nil if not known) IN |
| script | is the script to execute (may be a String, a File, or a Function) IN |
| evalStringAsFilePath | if kTrue evaluate if the script string is a file path IN |
| arguments | is used to pass arguments to the script IN |
| result | is the return value OUT |
| errorString | is the error string OUT |
| showErrorAlert | if kTrue show an error alert if an error occurs IN |
| invokeDebugger | indicates whether to load script into debugger for execution IN |
| undoMode | indicates how to handle undo for document changes made by the script IN |
| undoName | is the name for the undo step in single undo step mode IN |
| domVersion | is the desired version of the DOM in which to execute the script. For script files, defaults to the version of the DOM corresponding to the current version of the application (unless the file is in a "Version X.X Folder"). Ignored for text scripts, which use the version of the DOM currently set. Ignored for function callbacks, which use the version of the DOM in the function's context. |
| pure virtual |
Turns back on idle processing during scripting. Note: Used with DisableIdleProcessingDuringScripts() call.
| pure virtual |
A utility for script providers during their handling of e_Create. When handling the create event, there are several cases providers need to deal with:
| inScript | is the IScript off the parent object. This is the IScript passed to a create event handler. |
| inData | is the IScriptRequestData passed to the create event. |
| objectType | is the type of object being created. |
| outLocation | will be set to one of five values: en_Unknown, en_Before, en_After, en_Begin, or en_End. |
| outScript | - if outLocation is en_Before or en_After, then this will also be populated with the object to insert before or after. |
| pure virtual |
Extracts a ScriptVersion from a p_Version property.
| data | IN The IScriptRequestData to get the |
| internalVersion | OUT Will be set based on data |
| pure virtual |
Generate a text specifier for a list of scriptable objects. This specifier can be resolved to retrieve the objects.
| context | IN the request context |
| objects | IN the objects to convert |
| specifier | OUT the generated specifier |
| form | IN the desired specifier format |
| pure virtual |
Combine two specfiers to generate a range specifier for scriptable objects. This specifier can be resolved to retrieve the objects.
| context | IN is the request context |
| fromSpecifier | IN a specifier for the "from" part of the range |
| toSpecifier | IN a specifier for the "to" part of the range |
| specifier | OUT the generated specifier |
| pure virtual |
Generate a text specifier for a scriptable object. This specifier can be resolved to retrieve the object.
| context | IN the request context |
| object | IN the object to convert |
| specifier | OUT the generated specifier |
| form | IN the desired specifier format |
| pure virtual |
Generate a text specifier for a scriptable object as two parts: the workspace and the object. This specifier can be concatenated and resolved to retrieve the object.
| context | IN the request context |
| object | IN the object to convert |
| workSpaceSpecifier | OUT the generated specifier for the workspace |
| objectSpecifier | OUT the generated specifier for the object |
| form | IN the desired specifier format |
| pure virtual |
A utility for script providers during their handling of e_Move and e_Duplicate.
| outLocation | is one of the following: en_Before/en_After/en_Begin/en_End |
| outScript | is the object to move before/after at the beginning/end of |
Translate a scriptID into its four character code
| pure virtual |
Returns the folder in which scripting support files are stored.
| &outFolder | IDFile of scripting support folder |
| pure virtual |
Get all script managers
| pure virtual |
GetScriptsFolder returns the folder containing the user's scripts panel scripts. This is the folder the Scripts Panel displays for User scripts. In CS2, this was the folder named "Scripts" in the application's "Presets" folder. In CS3, this is the folder named "Scripts Panel" in the user's InDesign preferences' "Scripts" folder.
| scriptsFolder | is the scripts folder [out] |
| resolveAlias | - if true, the value returned in the scriptsFolder parameter is resolved if it's an alias/shortcut [in] |
| pure virtual |
Checks if idle processing is enabled during scripting. When idle processing is disabled, scheduled command will NOT be executed, idle task handlers will NOT be executed, and no user cancel events will be detected.
| pure virtual |
Returns kTrue if the active script context is the script manager for saving to InDesign interchange format
| pure virtual |
Returns kTrue if the active script context is the script manager for INX expanded
| pure virtual |
Returns kTrue if the active script context is the INX script manager during export session
| pure virtual |
Returns kTrue if the active script context is the script manager for INX traditional
| pure virtual |
Returns kTrue if the value of the param is the Nothing enumeration
| pure virtual |
Return kTrue if any Script Manager has an active script
| pure virtual |
Obtain the IScript interface to the application object
| pure virtual |
Access the document containing a script object
| script | is the script object |
| context | is the request context |
| pure virtual |
Query a particular ScriptInfoManager
| pure virtual |
Finds a particular script manager
| pure virtual |
Query a particular ScriptRequestHandler
| pure virtual |
Finds a script runner that can handle a script file
| pure virtual |
Return the workspace (document or application) for the script object
| script | is the script object |
| context | is the request context |
| pure virtual |
Release all references to script objects in the database (i.e., because the database is closing)
| pure virtual |
Resolve an object specifier into a list of objects.
| context | IN the request context |
| specifier | IN the object specifier to resolve |
| resolvedObjects | OUT the list of objects that were specified |
| pure virtual |
Resolve an object specifier into a list of objects.
| context | IN the request context |
| workSpaceSpecifier | IN the workspace specifier to resolve |
| objectSpecifier | IN the object specifier to resolve |
| resolvedObjects | OUT the list of objects that were specified |
| pure virtual |
Execute a command to set the application script prefs
| redraw | is whether to enable redraw during script execution |
| pure virtual |
Executes the command to set a script label
| scriptList | is the list of target objects |
| context | is the request context |
| label | is the label to set |
| key | is the key for the label, if any |
| pure virtual |
Executes the command to set multiple script labels
| scriptList | is the list of target objects |
| context | is the request context |
| labels | are the labels to set |
| replaceExistingLabels | if kTrue, instructs command to first remove all existing labels and insert the newly supplied ones; if kFalse, instructs command to append labels whose keys are not found in the existing set of labels, and replace labels whose keys are found in the existing set of labels |
| pure virtual |
If a scripting client hands us a string that begins with the keyStringPrefix ("$ID/"), we assume it is a key string, and we use this method to translate it (after dropping the prefix).
| s | is the string to translate |