JSScriptingSuite1 Struct Reference

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

#include <JSScriptingSuite.h>

Data Fields

ASAPI ASBoolean(* ScriptIsRunning )(void)
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.

Detailed Description

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


Field Documentation

ASAPI ASBoolean(* JSScriptingSuite1::ScriptIsRunning)(void)
Returns:
true if any of the published scripting engines is currently executing a script.
ASAPI ASErr(* JSScriptingSuite1::CreateEngine)(JSEngineRef *engineRefPtr)

Creates a new instance of a JavaScript Engine.

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

Disposes of a JavaScript Engine instance.

ASAPI ASErr(* JSScriptingSuite1::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(* JSScriptingSuite1::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(* JSScriptingSuite1::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.

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