Dialog Boxes

  Knozall AutomationWizard dialog_boxes.htm

AutomationWizard Dialog Boxes

AutomationWizard's prompt boxes make it simple for you to customize scripts to make them easy to use.  The capability provides for "Windows" like interface for people to read prompt messages and input answers required to run the script.

DropList Box

This box displays a dropdown list that allows the user to make a selection.  The box returns a number (if you use %PromptDropList), or a string (if you use $PromptDropList).

This example creates a simple breakfast menu of 5 items from which the user can select.

The script provides for 5 choices, set the default selection to 1, and will time out and make selection 1 in 30 seconds if the user does not make a selection.

REM DropList Dialog Box Example Breakfast Menu
Writecon "Welcome to Breakfast"
%temp=%PromptDropList["Choose your breakfast selection, 5, Waffles,Pancakes,Eggs&Bacon, Poached Eggs, FruitPlate, 1, 30"]
Writecon "Your breakfast selection is ",%temp
Writecon "Enjoy your breakfast"
Pause 30
 


Figure 1 Prompt DropList Box.  Breakfast menu options

 

Figure 2 Console Messages

 

If the script is modified to use the string version of the commands, it would look like this:

REM DropList Dialog Box Example
Writecon "Welcome to Breakfast"
$temp=$PromptDropList["Choose your breakfast selection, 5, Waffles,Pancakes,Eggs&Bacon, Poached Eggs, FruitPlate, 1, 30"]
Writecon "Your breakfast selection is ",$temp
Writecon "Enjoy your breakfast"
Pause 30
end

The console message for the string version is shown in Figure 3.

Figure 3 Console Messages with String Version of DropList

 

Prompt List

The prompt List box provides a scrollable list of items.  The script uses the PromptList function as shown below:

Writecon "Welcome to Breakfast"
$temp=$PromptList["Choose your breakfast selection, 5, Waffles,Pancakes,Eggs&Bacon, Poached Eggs, FruitPlate, 1, 30"]
Writecon "Your breakfast selection is ",$temp
Writecon "Enjoy your breakfast"
Pause 30
end

Figure 4 PromptList display of breakfast menu

 

PromptYN

A prompt box with a Yes/No answer can be constructed by using the PromptYN command.

 


Last updated 11/11/2009
©2009 Knozall Software, Inc.,  (800) 333 8698   (520) 426-3859
9386 N. Linnet Road, Casa Grande, Arizona 85294