8.18/6/2018

Watch.InputBox

Starting version 7.0, the Watch.InputBox function is deprecated and may no longer work due to changes in the way in which the Watch Service functions. This function is completely disabled in PlanetPress Suite 7.3 and higher.

Prompts the user to enter a string. The string is displayed as the window caption. You can specify a message that is displayed above the text box. This method is the same as PW_InputBox.

Clicking OK returns the value entered by the user. If no value was entered the default value is returned. Clicking Cancel returns the default value.

You must enable the “Run on desktop” option for the PlanetPress Suite process whose script calls Watch.InputBox. Otherwise PlanetPress Workflow application may stop working and require a reboot.

Example

s = watch.inputbox("caption", "message", "default")

watch.showmessage(s)

Examples

In the following example,Watch.InputBox requires the user to enter a line of text. The script the displays a popup of the message contents using Watch.ShowMessage.

VBScript
s = Watch.InputBox("Your Name", "Please enter your name", "John Doe")
Watch.ShowMessage("Will the real " + s + " please stand up?")
Javascript
s = Watch.InputBox("Your Name", "Please enter your name", "John Doe");
Watch.ShowMessage("Will the real " + s + " please stand up?");
Python
s = Watch.InputBox("Your Name", "Please enter your name", "John Doe")
Watch.ShowMessage("Will the real " + s + " please stand up?")
Perl
s = Watch->InputBox("Your Name", "Please enter your name", "John Doe");
Watch->ShowMessage("Will the real " + $s + " please stand up?");