Greetings,

If you're interested in hearing about errors that users have with your scripts, I would recommend using the new Error Reporting object available in the latest version of the GW Toolkit. Enabling Error Reporting for your script is as simple as adding one line:

ExecuteGlobal SharedObjects("com.GWMicro.ErrorReporting")("version", "email", boolean)

While this object is documented in the toolkit help, I think this feature is significant enough to discuss it here.

The first parameter, version, is a string that contains the version number of your script. If you supply this information through ClientInformation.ScriptVersion (which you should), you can just reference that property.

The second parameter, email, is a string that contains the email address where you would like error reports to be sent, assuming that the end user selects the Send Error button.

The final parameter is a boolean. If you set it to True, a tone will play when the error dialog pops up to help alert the user about the error. If the parameter is False, no tone will play.

For example:

ExecuteGlobal SharedObjects("com.GWMicro.ErrorReporting")(ClientInformation.ScriptVersion, "[EMAIL PROTECTED]", True)

If you want to ensure that the toolkit object exists before trying to use it (which is a good habit to get into), then you would do:

If Not SharedObjects("com.GWMicro.ErrorReporting") Is Nothing Then
ExecuteGlobal SharedObjects("com.GWMicro.ErrorReporting")(ClientInformation.ScriptVersion, "[EMAIL PROTECTED]", True)
Else
        Msgbox "GW Toolkit not found!"
End If

I'll be adding this feature to the GW Micro scripts as they get updated.

Enjoy!

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