Interacting with a Script
Python Scripting, along with Windows forms, allows you to interact with the script while it is running.
At the top of the script, make sure to include import System.Windows.Forms
After this, we can use the function MessageBox to display text.
Using the command:
System.Windows.Forms.MessageBox.Show("Test1","Test0")
The above command when used in a script, pops up a dialog box with the title of the Message box as Test0 and the text in the Message Box as Test1.
VBScript provides two functions that enable you to interact with a script while it is running:
InputBoxMsgBox
The InputBox
function displays a dialog box with an input field. The value that is
typed into the input field is returned. For example:
Dim
users_string
users_string = InputBox ("text prompt", "title of the pop-up dialog _
box", "default text for the input box")
The last two arguments to the function are optional.
The MsgBox
function shows a message and returns a number based on the button you press. For example:
MsgBox
("message text")