|
Download ActiveXperts Scripting Toolkit 2.1  (3170 KB - .exe file)
Download Manual  (68 KB - .htm file)
Product Overview
ActiveXperts Scripting Toolkit enables IT administrators and Software Developers to call VBScript functions without invoking the 'Windows Scripting Host'.
Usually, you call VBScript programs by invoking the 'Windows Script Host' (either WSCRIPT.EXE or CSCRIPT.EXE).
The ActiveXperts Scripting Toolkit directly communicates with the VBScript Engine of the operating system.
Some of the benefits of using ActiveXperts Scripting Toolkit instead of using the Windows Scripting Host:
- Use the function results directly in your code, without redirecting standard error and standard output;
- Call functions directly instead of writing 'stub' code - the results of the functions are available for direct use after the function completes;
- Pass function parameters dynamically - pass the function parameters 'on the fly', directly from your own application or script;
- Set a time-out to prevent functions from running in an endless loop;
- Intercept program errors that would normally crash the Windows Scripting Host;
- Customize your error messages;
- Support for Windows Services - you can call a VBScript function directly from a Windows Service.
ActiveXperts Scripting Toolkit is a ActiveX/COM component, that provides an easy-to-use scripting interface for companies who - somehow - want VBScript integration in their software.
ActiveXperts Scripting Toolkit features the following:
- Call functions directly;
- Pass up to 8 parameters;
- Comprehensive Function return information
- Comprehensive Script completion information
- Ability to set a time-out, preventing scripts from never completing;
- Robust script handing - bad scripts that would usually make a sub-system crash are intercepted by the toolkit;
- Thread safe - the Toolkit can be used in any multi-threading (and multi-processing) environment;
- Support for Windows Services;
- Advanced error handling;
- Advanced logging.
ActiveXperts Scripting Toolkit runs on the following Operating Systems:
- Windows Vista;
- Windows 2003;
- Windows XP;
- Windows 2000;
- Windows NT4;
- Windows 98 and Windows ME.
ActiveXpert Scripting Toolkit includes samples for many development tools, including:
- Visual Basic .NET - Windows .NET based application;
- Visual C# .NET - Windows .NET based applications;
- Visual Basic 5.x or higher - Windows based applications;
- Visual C++ 5.x or higher - Windows based applications;
- ASP - Web site based on Active Server Pages;
- ASP .NET - Web site based on Active Server Pages and the .NET Framework;
- VBScript - Windows based scripts;
- Any other development platform that supports ActiveX/COM components.
The performance of the module is outstanding, due to its multi-threaded architecture.
It has proven its strength in many business environments over the years.
Architecture
ActiveXperts Scripting Toolkit makes use of the Microsoft VBScript Engine. It only makes use of the engine; it doesn't replace any VBScript engine components.
The core of ActiveXperts Scripting Toolkit consists of one file:
- AxScript.dll - the actual ActiveX/COM component;
ActiveXperts Scripting Toolkit can be distributed easily to many PC's. Once you have purchased the licenses, you copy the AxScript.dll to the PCs and register the DLL on that PC.
Code Snippets and Sample Applications
The following code snippets (VBScript) illustrate how to use the Scripting object.
For more samples, including Visual C++, Visual Basic, Visual Basic .NET and Visual C Sharp .NET, please check the Online ActiveXperts Scripting Toolkit Samples.
Visual C# .NET sample showing how to run a VBScript program
using System;
using AxScript;
namespace Example1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
XScripting objScripting = new XScripting (); ' Create a new Scripting instance
XCompletion objCompl;
objScripting.ScriptFile = "C:\My Scripts\Script.vbs"; ' Set VBScrilt file
objScripting.Function = "GetDirectorySize"; ' Set function
objScripting.Parameter1 = "\"C:\Windows\""; ' Set 1st parameter
objCompl = objScripting.Run(); ' Run the script
Console.WriteLine( "CompletionCode : {0}", objCompl.CompletionCode ); ' Result (numeric) of the script execution
Console.WriteLine( "CompletionDescr. : {0}", objCompl.CompletionDescription ); ' Result (friendly string) of the execution
if ( objCompl.CompletionCode == 0 )
{
Console.WriteLine( "FunctionRetNumber: {0}", objCompl.FunctionReturnNumber); ' Return value (Number) of the function
Console.WriteLine( "FunctionRetString: {0}", objCompl.FunctionReturnString ); ' Return value (String) of the function
Console.WriteLine( "FunctionRetInfo : {0}", objCompl.FunctionReturnInfo ); ' Return value (Variant) of the function
}
else
{
Console.WriteLine( "ComplErrorSource : {0}", objCompl.CompletionErrorSource );' Shows in which script the error occured
Console.WriteLine( "ComplErrorDescr. : {0}", objCompl.CompletionErrorDescription ); ' Gives a short description of the error
Console.WriteLine( "ComplErrorLine : {0}", objCompl.CompletionErrorLine ); ' Shows in which line the error occured
Console.WriteLine( "ComplErrorChar : {0}", objCompl.CompletionErrorChar ); ' Shows on which char position the error occured
Console.WriteLine( "ComplErrorCode : {0}", objCompl.CompletionErrorCode ); ' Shows the Microsoft VBScript Engine error code
}
}
}
}
VBScript sample showing how to run a VBScript program
Set objScripting = CreateObject( "ActiveXperts.Scripting" )' Create a new Scripting instance
objScripting.ScriptFile = "C:\My Scripts\Script.vbs" ' Set VBScrilt file
objScripting.Function = "GetDateAndTime" ' Set function
Set objCompletion = objScripting.Run ' Run the script
WScript.Echo "CompletionCode : " & objCompletion.CompletionCode ' Result (numeric) of the script execution
WScript.Echo "CompletionDescr. : " & objCompletion.CompletionDescription ' Result (friendly string) of the script execution
If( objCompletion.CompletionCode = 0 ) Then
WScript.Echo "FunctionReturnNumber : " & objCompletion.FunctionReturnNumber ' Return value (Number) of the function
WScript.Echo "FunctionReturnString : " & objCompletion.FunctionReturnString ' Return value (String) of the function
WScript.Echo "FunctionReturnInfo : " & objCompletion.FunctionReturnInfo ' Return value (Variant) of the function
Else
WScript.Echo "CompletionErrorSource : " & objCompletion.CompletionErrorSource ' Shows in which script the error occured
WScript.Echo "CompletionErrorDescription : " & objCompletion.CompletionErrorDescription ' Gives a short description of the error
WScript.Echo "CompletionErrorLine : " & objCompletion.CompletionErrorLine ' Shows in which line the error occured
WScript.Echo "CompletionErrorChar : " & objCompletion.CompletionErrorChar ' Shows on which character position the error occured
WScript.Echo "CompletionErrorCode : " & objCompletion.CompletionErrorCode ' Shows the Microsoft VBScript Engine error code
End If
Click here for more samples.
Operating System
ActiveXperts Scripting Toolkit runs on the following Operating Systems:
- Windows Vista - Windows Vista Business, Windows Vista Enterprise, Windows Vista Home Premium, Windows Vista Home Basic, Windows Vista Ultimate;
- Windows 2003 - Windows 2003 Standard Edition, Windows 2003 Enterprise Edition, Windows 2003 Datacenter Edition, Windows 2003 Web Edition;
- Windows 2000 - Windows 2000 Professonal, Windows 2000 Server, Windows 2000 Advanced Server and Windows 2000 Datacenter;
- Windows XP - Windows XP Home Edition and Windows XP Professional Edition;
- Windows NT4 - Windows NT4 Workstation and Windows NT4 Server (Service Pack 3 required);
- Windows ME - Windows Millenium Edition;
- Windows 98 - Windows 98 and Windows 98 SE (Second Edition).
ASP .NET, VB .NET, VC# .NET, ASP, VB, Visual C++ and more
The ActiveXperts Scripting Toolkit software can be used by using any of these languages:
- Visual Basic 5.x or higher;
- Visual Basic .NET;
- ASP 2.x;
- ASP .NET;
- Visual C++ 5.x or higher;
- Visual C# .NET;
- VBScript;
- HTML - Client scripts within HTML pages - requires Internet Explorer 4.x or higher.
.NET Framework
To use ActiveXperts Scripting Toolkit in an ASP .NET, Visual Basic .NET or Visual C#. NET environment, the .NET Framework must be installed on the system.
The .NET Framework is part of the Windows 2003 Operating System. On Windows 2000, Windows 98, Windows ME, Windows NT, Windows Server 2003 and Windows XP, it's available as a separate installation.
Please visit the Technology Information for the .NET Framework page to download the .NET Framework.
Internet Information Server
Internet Information Server (IIS) Setup installs the Visual Basic Script and Java Script engines.
To run ASP pages on NT4 Servers, IIS 4.x must be installed. IIS 4.x ships with the NT4 Option Pack CD's.
To run ASP pages on Windows 2000 Servers, IIS 5.x must be installed. IIS is part of the Windows 2000 Operating System.
Internet Explorer 4.x or higher
The Internet Explorer 4.x Setup (or higher) installs the Visual Basic Script and Java Script engines.
You can use the ActiveXperts Scripting Toolkit component from within the client HTML code.
Windows Scripting Host
ActiveXperts Scripting Toolkit can be used in VBS scripts. VBS scripts can be used by passing the script-file as a parameter to the scripting host ( either 'cscript' or 'wscript').
WSH relies on the Visual Basic Script and Java Script engines provided with Internet Explorer 4.x or later. WSH is also installed as part of Windows 98, Windows 2000, and Internet Information Services 4.0. A separate setup program is provided for Windows 95.
Visual Basic
ActiveXperts Scripting Toolkit can be used in Visual Basic 5.x or higher. In Visual Basic, go to the 'Project/References...' menu item and check the box next to ActiveXperts Scripting Toolkit Type Library. Now, you can declare and create ActiveXperts Scripting Toolkit objects.
See also the samples chapter for further details.
Visual C++
ActiveXperts Scripting Toolkit can be used inside Visual C++ applications. Use Visual C++ 5.x or higher. Include the *.h and *.c file provided by ActiveXperts to bind your code to the ActiveXperts Scripting Toolkit components.
Visual C samples are installed as part of the product, but can also be found on our website.
The ActiveXperts Scripting Toolkit components
The ActiveXperts Scripting Toolkit package consits of 3 components; any combination of components can be installed:
- The ActiveXperts Scripting Toolkit COM component - the interface to VB programs;
- The ActiveXperts Scripting Toolkit Help Files - documentation;
- The ActiveXperts Scripting Toolkit Samples - samples.
Installation on a single computer
Simply run the AxScript.exe Setup program. The InstallShield wizard will guide you through the rest of the setup.
If you choose the ActiveXperts Scripting Toolkit COM component, the Setup program can perform the registration of the COM component for you. But it will also give you the opportunity to register the object yourself.
Any subsequent installation of ActiveXperts Scripting Toolkit can be performed either manually or by using the Setup program.
Installation on multiple computers
Any subsequent installations can be performed using the setup program.
But since the installation of the core components is very simple, you may want to do it manually, or integrate it into your companies software distribution program.
If you choose to install the COM component manually on other machines, simply perform the following actions:
- Copy the ASocket.dll (the ActiveXperts Scripting Toolkit COM component) to a destination location on the new machine;
- Register the COM component by using the following command: REGSVR32 <dest-location>\ASocket.dll
|
|