JSScriptingSuite3 Struct Reference

The set of routines available in Version 3 of the JavaScript suite. More...

#include <JSScriptingSuite.h>

Data Fields

ASAPI ASBoolean(* ScriptIsRunning )(void)
 Returns true if any of the published scripting engines is currently executing a script.
ASAPI ASErr(* CreateEngine )(JSEngineRef *engineRefPtr)
 Creates a new instance of a JavaScript Engine.
ASAPI ASErr(* DeleteEngine )(JSEngineRef engineRef)
 Disposes of a JavaScript Engine instance.
ASAPI ASErr(* SetIncludePath )(JSEngineRef engineRef, const ASUnicode *includePath)
 Set the default search path(s) for include files encountered in script files executed by an engine.
ASAPI ASErr(* GetIncludePath )(JSEngineRef engineRef, ASUnicode *includePathBuff, long *buffSize)
 Get the default search path(s) for include files encountered in script files executed by an engine.
ASAPI ASErr(* ExecuteScript )(JSEngineRef engineRef, const ASUnicode *script, JavaScriptExecutionMode executionMode, const ASUnicode **result)
 Execute a JavaScript script.
ASAPI ASErr(* SuspendResumeAppleEventProcessing )(ASBoolean suspend)
 Suspend / resume the processing of Apple events.
ASAPI ASErr(* IsAppleEventProcessingSuspended )(ASBoolean *suspended)
 Return true if Apple event processing is suspended.

Detailed Description

The set of routines available in Version 3 of the JavaScript suite.


Field Documentation

ASAPI ASBoolean(* JSScriptingSuite3::ScriptIsRunning)(void)

Returns true if any of the published scripting engines is currently executing a script.

ASAPI ASErr(* JSScriptingSuite3::CreateEngine)(JSEngineRef *engineRefPtr)

Creates a new instance of a JavaScript Engine.

ASAPI ASErr(* JSScriptingSuite3::DeleteEngine)(JSEngineRef engineRef)

Disposes of a JavaScript Engine instance.

ASAPI ASErr(* JSScriptingSuite3::SetIncludePath)(JSEngineRef engineRef, const ASUnicode *includePath)

Set the default search path(s) for include files encountered in script files executed by an engine.

This string contains all include directories, separated by the colon or the semicolon characters.

ASAPI ASErr(* JSScriptingSuite3::GetIncludePath)(JSEngineRef engineRef, ASUnicode *includePathBuff, long *buffSize)

Get the default search path(s) for include files encountered in script files executed by an engine.

buffSize size, in ASUnicode characters, of the includePathBuff being passed in. If get fails, buffSize will contain the required size for the buffer to contain the entire path string.

ASAPI ASErr(* JSScriptingSuite3::ExecuteScript)(JSEngineRef engineRef, const ASUnicode *script, JavaScriptExecutionMode executionMode, const ASUnicode **result)

Execute a JavaScript script.

Parameters:
engineRefEngine with which to execute JavaScript script, acquired from CreateEngine.
scriptunicode text of the JavaScript script to be executed.
executionModeIf kJSExecutionModeRun then the JavaScript is executed normally, if kJSExecutionModeDebug then the JavaScript is halted at the first line and the debugger Ui is shown
resultPointer to result of execution. If an execution error occured, the returned string will contain error information.
Returns:
kSPNoError Success. kJSScriptExecutionError Additional information available in result string.
ASAPI ASErr(* JSScriptingSuite3::SuspendResumeAppleEventProcessing)(ASBoolean suspend)

Suspend / resume the processing of Apple events.

This method can be nested and you have to call the method with "false" as many times as you call it with "true". ----

Parameters:
suspendif true then processing of Apple events is suspended. if false, then processing of Apple events is resumed. If event processing becomes effectively resumed by calling this method with false, then all suspended events are dispatched before the method returns. This means that event processing should only be resumes when Photoshop is in a state where Apple events may be processed.
ASAPI ASErr(* JSScriptingSuite3::IsAppleEventProcessingSuspended)(ASBoolean *suspended)

Return true if Apple event processing is suspended.


The documentation for this struct was generated from the following file: