RobertoBianchi
28-07-2008, 12:44
Please find in the attached file the first experimental version of ThinBASIC COM server, it supports the dual interface so you can use it for launch of ThinBASICs’ script from .VBS script, .JS script and VBA as well using the Dispatch interface from other languages (please see the TBCOMSRV.INC for use it from Power Basic).
Warning: this is a trial version that will expire at December 31, 2008.
There are the four methods available, here is a brief syntax explanation of them:
Initialize() Method
The Initialize method initializes the interpreter for use by client application (for example a not ThinBASIC script).
Syntax
Initialize(sUser As String, sKey As String, Flag As Long, hWnd As long, hInstance As Long)
Parameters
sUser A valid user name, for trial pass "EveryOne"
sKey A valid key, fro trial pass "TrialVersion"
Flag Not used, pass 0
hWnd Handle to the owner window. If no owner window pass 0
hInstance Handle to application instance. If no instance pass 0
Run() Method
The Run method executes a ThinBASIC's script.
Syntax
Run(sScript As String, sCmdLine As String, Options As Long)
Parameters
sScript The ThinBASIC's Script to execute
sCmdLine Command line to pass to the script *
Options Not used, pass 0
* Actually this parameter isn't available
Free() Method
The Free release the interpreter and close all open resources.
Syntax
Free()
Parameters
This method has no parameters
DisplayInfo() Method
The DisplayInfo method display information about the COM server.
This method is also useful to check if the COM server is configured properly.
Syntax
DisplayInfo()
Parameters
This method has no parameters
The zip file also include some exalmples files (VBS, JS and Excel).
How use it:
You should copy the ThinBASIC.DLL file in the ThinBASIC’s installation root (C:\THINBASIC for example), open the command prompt then go to the ThinBASIC installation root and run this command: regsvr32 ThinBASIC.dll.
Now you are ready to use and test the COM Server.
As usual your feedbacks and suggestions are welcome.
Thank you very much and best regards,
Roberto
Warning: this is a trial version that will expire at December 31, 2008.
There are the four methods available, here is a brief syntax explanation of them:
Initialize() Method
The Initialize method initializes the interpreter for use by client application (for example a not ThinBASIC script).
Syntax
Initialize(sUser As String, sKey As String, Flag As Long, hWnd As long, hInstance As Long)
Parameters
sUser A valid user name, for trial pass "EveryOne"
sKey A valid key, fro trial pass "TrialVersion"
Flag Not used, pass 0
hWnd Handle to the owner window. If no owner window pass 0
hInstance Handle to application instance. If no instance pass 0
Run() Method
The Run method executes a ThinBASIC's script.
Syntax
Run(sScript As String, sCmdLine As String, Options As Long)
Parameters
sScript The ThinBASIC's Script to execute
sCmdLine Command line to pass to the script *
Options Not used, pass 0
* Actually this parameter isn't available
Free() Method
The Free release the interpreter and close all open resources.
Syntax
Free()
Parameters
This method has no parameters
DisplayInfo() Method
The DisplayInfo method display information about the COM server.
This method is also useful to check if the COM server is configured properly.
Syntax
DisplayInfo()
Parameters
This method has no parameters
The zip file also include some exalmples files (VBS, JS and Excel).
How use it:
You should copy the ThinBASIC.DLL file in the ThinBASIC’s installation root (C:\THINBASIC for example), open the command prompt then go to the ThinBASIC installation root and run this command: regsvr32 ThinBASIC.dll.
Now you are ready to use and test the COM Server.
As usual your feedbacks and suggestions are welcome.
Thank you very much and best regards,
Roberto