InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IUxpScriptUtils Class Referenceabstract
Inheritance diagram for IUxpScriptUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IUXPSCRIPTUTILS }
 

Public Member Functions

virtual ErrorCode CreateUxpScriptEngine (const PMString &engineName, bool16 isResettable, bool16 isDebuggable) const =0
 
virtual ErrorCode DeleteUxpScriptEngine (const PMString &engineName) const =0
 
virtual ErrorCode RunFileInEngine (const PMString &engineName, const IDFile &idFile, bool16 showErrorAlert=kTrue, bool16 invokeDebugger=kFalse) const =0
 
virtual ErrorCode RunScriptInEngine (const PMString &engineName, const PMString &scriptText, bool16 showErrorAlert=kTrue, bool16 invokeDebugger=kFalse) const =0
 
virtual ErrorCode RunScriptInEngine (const PMString &engineName, const ScriptData &script, const ScriptRecordData &arguments, ScriptData &result, PMString &errorString, bool16 showErrorAlert=kTrue, bool16 invokeDebugger=kFalse, const RunScriptParams::UndoMode undoMode=RunScriptParams::kUndoScriptRequest, const PMString &undoName=PMString()) const =0
 
virtual ErrorCode RunScriptInEngine (const PMString &engineName, const ScriptData &script, bool16 evalStringAsFilePath, const ScriptRecordData &arguments, ScriptData &result, PMString &errorString, bool16 showErrorAlert=kTrue, bool16 invokeDebugger=kFalse, const RunScriptParams::UndoMode undoMode=RunScriptParams::kUndoScriptRequest, const PMString &undoName=PMString()) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual ErrorCode IUxpScriptUtils::CreateUxpScriptEngine (const PMStringengineName,
bool16 isResettable,
bool16 isDebuggable 
) const
pure virtual

Create a new engine, if none exists with this name

Parameters
engineNameis the name of the engine to create
isResettablewhether the engine should be reset after every script
isDebuggablewhether the engine should be visible to the ESTK IDE
Returns
kSuccess if a new engine is created, kItemWithThisNameAlreadyExistsError if an engine with this name already exists, or kFailure if no engine was created
virtual ErrorCode IUxpScriptUtils::DeleteUxpScriptEngine (const PMStringengineName) const
pure virtual

Delete an engine by name

Parameters
engineNameis the name of the engine to delete
Returns
kSuccess if an engine with that name was found and deleted, kObjectDeletedError if no engine with that name was found, or kFailure if an engine was found but not deleted
virtual ErrorCode IUxpScriptUtils::RunFileInEngine (const PMStringengineName,
const IDFileidFile,
bool16 showErrorAlert = kTrue,
bool16 invokeDebugger = kFalse 
) const
pure virtual

Execute a script file in a particular engine. Creates the engine if it doesn't already exist.

Parameters
engineNameis the name of the engine to use
idFilethe script file to execute IN
showErrorAlertif an error occurs whether the runner should display an alert with the error IN
invokeDebuggerwhether to load script into debugger for execution IN
Returns
is kSuccess or an error code
virtual ErrorCode IUxpScriptUtils::RunScriptInEngine (const PMStringengineName,
const PMStringscriptText,
bool16 showErrorAlert = kTrue,
bool16 invokeDebugger = kFalse 
) const
pure virtual

Execute a script in a particular engine. Creates the engine if it doesn't already exist.

Parameters
engineNameis the name of the engine to use
scriptTextthe script text to execute IN
showErrorAlertif an error occurs whether the runner should display an alert with the error IN
invokeDebuggerwhether to load script into debugger for execution IN
Returns
is kSuccess or an error code
virtual ErrorCode IUxpScriptUtils::RunScriptInEngine (const PMStringengineName,
const ScriptDatascript,
const ScriptRecordData & arguments,
ScriptDataresult,
PMStringerrorString,
bool16 showErrorAlert = kTrue,
bool16 invokeDebugger = kFalse,
const RunScriptParams::UndoMode undoMode = RunScriptParams::kUndoScriptRequest,
const PMStringundoName = PMString() 
) const
pure virtual

Execute a script in a particular engine. Creates the engine if it doesn't already exist.

Parameters
engineNameis the name of the engine to use IN
scriptis the script to execute (may be a String, a File, or a Function) IN
argumentsis used to pass arguments to the script IN
resultis the return value OUT
errorStringis the error string OUT
showErrorAlertif kTrue show an error alert if an error occurs IN
invokeDebuggerindicates whether to load script into debugger for execution IN
undoModeindicates how to handle undo for document changes made by the script IN
undoNameis the name for the undo step in single undo step mode IN
Returns
kSuccess or an error
virtual ErrorCode IUxpScriptUtils::RunScriptInEngine (const PMStringengineName,
const ScriptDatascript,
bool16 evalStringAsFilePath,
const ScriptRecordData & arguments,
ScriptDataresult,
PMStringerrorString,
bool16 showErrorAlert = kTrue,
bool16 invokeDebugger = kFalse,
const RunScriptParams::UndoMode undoMode = RunScriptParams::kUndoScriptRequest,
const PMStringundoName = PMString() 
) const
pure virtual

INTERNAL USE ONLY Execute a script in a particular engine. Creates the engine if it doesn't already exist.

Parameters
engineNameis the name of the engine to use IN
scriptis the script to execute (may be a String, a File, or a Function) IN
evalStringAsFilePathif kTrue evaluate if the script string is a file path IN
argumentsis used to pass arguments to the script IN
resultis the return value OUT
errorStringis the error string OUT
showErrorAlertif kTrue show an error alert if an error occurs IN
invokeDebuggerindicates whether to load script into debugger for execution IN
undoModeindicates how to handle undo for document changes made by the script IN
undoNameis the name for the undo step in single undo step mode IN
Returns
kSuccess or an error