Ekas Software Windows Script Host Control for Delphi Help
|
Place script control to Delphi form and set its properties to needed values. Most important property is ScriptLng. It describes which scripting language will be used, and having registered version you can enhance the set of possible languages very easy. Initially, the set of languages contains VBScript, JavaScript, Perl, Python, Rexx, Tcl, Lua. Please take in account that only VBScript and JavaScript are provided with Windows Script Host in standart installation packages of Windows. Other languages must be installed additionally (usually they are supplied by 3rd party developers).
When all properties are correctly defined, you can add script code using AddCode method. There is absolutely no difference where the text of script is obtained. It just must be written in script language corresponding to ScriptLng property. Also you can use Eval and ExecuteStatement methods to evaluate any expression or execute any single statement in corresponding script language. If any script code was added before using Eval and ExecuteStatement methods then they can operate with members contained in it.
To let script operate with Delphi object, you have to share this object using RegisterClass method.
To call procedure or function defined in script code, you have to use RunProc method.
Property ScriptError and event OnError let you to analize errors occured during script execution.
All of these questions (and other items) are described in the rest of topics of this group and in entire help.
Ekas Software Windows Script Host Control for Delphi Help
|
Copyright (c)2002,2003 Ekas Software
|