This class is defined in the \fBQt ActiveQt Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main TQt API.
The QAxScriptManager acts as a bridge between the COM objects embedded in the TQt application through QAxObject or QAxWidget, and the scripting languages available through the Windows Script technologies, usually JScript and VBScript.
Create one QAxScriptManager for each separate document in your application, and add the COM objects the scripts need to access using addObject(). Then load() the script sources and invoke the functions using call().
.PP
\fBWarning:\fR This class is not available with the bcc5.5 and MingW compilers.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Adds a generic COM wrapper for \fIobject\fR to the manager. \fIobject\fR must be exposed as a COM object using the functionality provided by the QAxServer module.. Applications using this function you must link against the qaxserver library.
Calls \fIfunction\fR, passing the parameters \fIvar1\fR, \fIvar1\fR, \fIvar2\fR, \fIvar3\fR, \fIvar4\fR, \fIvar5\fR, \fIvar6\fR, \fIvar7\fR and \fIvar8\fR as arguments and returns the value returned by the function, or an invalid QVariant if the function does not return a value or when the function call failed. The call returns when the script's execution has finished.
.PP
In most script engines the only supported parameter type is "const QVariant&", for example, to call a JavaScript function
As with dynamicCall the parameters can directly be embedded in the function string.
.PP
.nf
.br
script->call("setNumber(5)");
.br
.fi
However, this is slower.
.PP
Functions provided by script engines that don't support introspection are not available and must be called directly using QAxScript::call() on the respective script object.
.PP
Note that calling this function can be significantely slower than using call() on the respective QAxScript directly.
Returns a list with all the functions that are available. Functions provided by script engines that don't support introspection are not included in the list. The functions are either provided with full prototypes or only as names, depending on the value of \fIflags\fR.
Loads the script source \fIcode\fR using the script engine for \fIlanguage\fR. The script can later be referred to using its \fIname\fR which should not be empty.
.PP
The function returns a pointer to the script for the given \fIcode\fR if the \fIcode\fR was loaded successfully; otherwise it returns 0.
.PP
If \fIlanguage\fR is empty it will be determined heuristically. If \fIcode\fR contains the string "End Sub" it will be interpreted as VBScript, otherwise as JScript. Additional script engines can be registered using registerEngine().
.PP
You must add all the objects necessary (using addObject()) \fIbefore\fR loading any scripts. If \fIcode\fR declares a function that is already available (no matter in which language) the first function is overloaded and can no longer be called via call(); but it will still be available by calling its script directly.
.PP
See also addObject(), scriptNames(), and functions().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Loads the source code from the \fIfile\fR. The script can later be referred to using its \fIname\fR which should not be empty.
.PP
The function returns a pointer to the script engine for the code in \fIfile\fR if \fIfile\fR was loaded successfully; otherwise it returns 0.
.PP
The script engine used is determined from the file's extension. By default ".js" files are interpreted as JScript files, and ".vbs" and ".dsm" files are interpreted as VBScript. Additional script engines can be registered using registerEngine().
You can use the returned pointer to call functions directly through QAxScript::call(), to access the script engine directly, or to delete and thus unload the script.