Platforms to show: All Mac Windows Linux Cross-Platform

Back to WindowsScriptMBS class.

WindowsScriptMBS.AllowUI as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Windows MBS Win Plugin 10.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Enable or disable display of the UI.
Example
dim w as new WindowsScriptMBS

w.Language = "VBScript"

w.AddCode "a = 1"
w.AddCode "b = 2"

w.AllowUI = true
w.ExecuteStatement "msgbox a+b" // shows 3

w.AllowUI = false
w.ExecuteStatement "msgbox a+b" // shows exception with access denied

Exception e as WindowsScriptErrorExceptionMBS
MsgBox e.message

(Read and Write property)

Some examples using this property:

WindowsScriptMBS.Error as WindowsScriptErrorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Windows MBS Win Plugin 10.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The current error status.

(Read only property)

WindowsScriptMBS.Language as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Windows MBS Win Plugin 10.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Language engine to use.
Example
dim w as new WindowsScriptMBS

w.Language = w.kLanguageJScript

MsgBox w.Language // shows "JScript"

w.Language = w.kLanguageVBScript

MsgBox w.Language // shows "VBScript"

Use kLanguageVBScript or kLanguageJScript constants.
Setting this property calls reset internally.
(Read and Write property)

WindowsScriptMBS.Lasterror as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Windows MBS Win Plugin 10.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The last error code.

0 is no error. -1 is a parameter error on the plugin side. All other codes are from Windows.
(Read and Write property)

WindowsScriptMBS.SitehWnd as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Windows MBS Win Plugin 10.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The window handle for the window being parent to any window the scripts create.
Example
dim w as new WindowsScriptMBS
w.SitehWnd = window1.handle

The window is used as the parent window for message boxes, alerts, etc.
(Read and Write property)

WindowsScriptMBS.Timeout as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Windows MBS Win Plugin 10.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Length of time in milliseconds that a script can execute before being considered hung.

(Read and Write property)

WindowsScriptMBS.UseSafeSubset as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Windows MBS Win Plugin 10.0 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Force script to execute in safe mode and disallow potentially harmful actions.

(Read and Write property)

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...