Greetings,

Several of you have mentioned the ability to include files. We will consider adding an Include method, but it won't make 7.0.

In the meantime, you already have this functionality through the ExecuteGlobal function of VBScript (eval and/or execute in other languages). In fact, the GW Toolkit Error Reporting feature requires ExecuteGlobal to function. ExecuteGlobal takes a string, and executes it in your script's space, which is what an include does, essentially.

So you can use the FileSystemObject to read in a VBS, pass it to ExecuteGlobal, and viola: you have an include.

I'm going to add a method to the toolkit (probably called something like FileToString, or ReadFile, or something like that) which will provide the FSO functionality for you. So you'll do something like:

ExecuteGlobal SharedObjects("com.GWMicro.GWToolkit.ReadFile")("file.vbs")

Look for this in the next version of the toolkit.

Aaron
--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.

Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development

Reply via email to