Global Functions |
There are two globally-defined functions for the Scriptable Object component, alert and errmsg.
![]() |
alert |
The alert function is provided mainly for compatibility with the JScript language. This function takes a single string parameter which will be presented to the user as a standard modal Windows message box with an OK button. VBScript users will probably want to use the more extensive MsgBox function - which is provided natively by the VBScript engine - rather than the alert method.
alert(string)
function MyEventSrc::Event1( )
{
// will pop up a message box with the following text
alert("In MyEventSrc_Event1!");
}
![]() |
errmsg |
The errmsg function is also a replacement for functionality typically provided
by MsgBox. The function takes a string parameters, and puts up a "Script
Error" message box with an OK button, and returns both the text of the
string and the line number at which it occurs.
function MyEventSrc::Event1( )
{
// will pop up a script message box with the following text
errmsg("In MyEventSrc_Event1!");
}