InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RunScriptParams Class Reference

Public Types

enum  UndoMode { kUndoScriptRequest = en_UndoScriptRequest, kUndoEntireScript = en_UndoEntireScript, kFastUndoEntireScript = en_FastUndoEntireScript, kAutoUndoScript = en_AutoUndoScript }
 

Public Member Functions

 RunScriptParams (IScriptRunner *scriptRunner)
 
 RunScriptParams (const RunScriptParams &params, IScriptRunner *scriptRunner)
 
IScriptRequestDataQueryScriptRequestData () const
 
ScriptVersion GetVersion () const
 
void SetVersion (const ScriptVersion &version)
 
IScriptQueryTarget () const
 
void SetTarget (IScript *target)
 
bool16 GetShowErrorAlert () const
 
void SetShowErrorAlert (bool16 showErrorAlert)
 
bool16 GetInvokeDebugger () const
 
void SetInvokeDebugger (bool16 invokeDebugger)
 
virtual UndoMode GetUndoMode () const
 
virtual void SetUndoMode (UndoMode undoMode)
 
PMString GetUndoName () const
 
void SetUndoName (const PMString &undoName)
 

Member Enumeration Documentation

The undo mode for script execution
Enumerator
kUndoScriptRequest 

Push each script request as a separate undo step

kUndoEntireScript 

Push the entire script as a single regular undo step. If an error occurs, roll back to the beginning of the script request that generated the error.

kFastUndoEntireScript 

Similar to kUndoEntireScript, however faster because we don't snapshot each script request. If an error occurs, we roll back to the beginning of the entire script.

kAutoUndoScript 

Push the entire script as a single auto-undoable step

Constructor & Destructor Documentation

RunScriptParams::RunScriptParams (IScriptRunnerscriptRunner)
explicit

Construct a new RunScriptParams object

Parameters
scriptRunneris the script runner that will execute the script
RunScriptParams::RunScriptParams (const RunScriptParamsparams,
IScriptRunnerscriptRunner 
)

Construct a new RunScriptParams object as a copy of the passed in object but using the passed in scriptRunner (e.g., for re-targeting a script to a different engine)

Parameters
paramsis the object to copy
scriptRunneris the script runner that will execute the script

Member Function Documentation

bool16 RunScriptParams::GetInvokeDebugger () const
inline

Get whether to load the script into a debugger for execution (defaults to kFalse)

bool16 RunScriptParams::GetShowErrorAlert () const
inline

Get whether the runner should display an alert with the error if an error occurs (defaults to kTrue)

virtual UndoMode RunScriptParams::GetUndoMode () const
inlinevirtual

Get the undo mode for the script's execution (defaults to kUndoScriptRequest)

PMString RunScriptParams::GetUndoName () const
inline

Get the undo name for the undo step in single undo step mode (defaults to "Script")

ScriptVersion RunScriptParams::GetVersion () const
inline

Get the desired version of the DOM in which to execute the script (defaults to the version of the DOM corresponding to the current version of the application)

IScriptRequestData* RunScriptParams::QueryScriptRequestData () const

Query the IScriptRequestData that is used to pass arguments and return the result

IScript* RunScriptParams::QueryTarget () const

Query the target IScript (defaults to the application object)

void RunScriptParams::SetInvokeDebugger (bool16 invokeDebugger)
inline

Set whether to load the script into a debugger for execution (defaults to kFalse)

void RunScriptParams::SetShowErrorAlert (bool16 showErrorAlert)
inline

Set whether the runner should display an alert with the error if an error occurs (defaults to kTrue)

void RunScriptParams::SetTarget (IScripttarget)

Set the target IScript (defaults to the application object)

virtual void RunScriptParams::SetUndoMode (UndoMode undoMode)
inlinevirtual

Set the undo mode for the script's execution (defaults to kUndoScriptRequest)

void RunScriptParams::SetUndoName (const PMStringundoName)
inline

Set the undo name for the undo step in single undo step mode (defaults to "Script")

void RunScriptParams::SetVersion (const ScriptVersionversion)
inline

Set the desired version of the DOM in which to execute the script (defaults to the version of the DOM corresponding to the current version of the application)