UI
Library
One very useful feature of command scripting is the ability
to prompt the user for input or a decision before submitting a command.
To support the need for user interfaces in command scripting, Indigo
includes a UI (user interface) library that provides common user interface
components can can be accessed using command scripting.
(The UI Library is used in conjunction with Command
Scripting.)
The
UI Library is included as on open source VB script file and is located
in the program SCRIPTS directory under file name "UI.vbs".
C:\DEV\shadeBlue\Indigo\SOURCE
2.0\Scripts
You
can make any modifications or additions you wish; however, it is recommended
to save your custom script file under a different filename. Future updates
from shadeBlue to this file may overwrite your customizations if they
are included in "UI.vbs".
The
UI Library includes the following callable user interface elements:
Prompt
for Text
Format:
Text(TextMessage,
DefaultValue)
Example:
:@UI.Text("Enter
Your Name", "John")
<return
to top>
Prompt
for Range
Format:
Range(TextMessage,DefaultValue,MinRangeValue,
MaxRangeValue)
Example:
:@UI.Range("Enter
Your Age",21,1,110)
<return
to top>
Prompt
for Slider
Format:
Slider(TextMessage, DefaultValue,
MinRangeValue, MaxRangeValue)
Example:
:@UI.Slider("Enter
Your Age",21,1,110)
<return
to top>
Prompt
Error Message
Format:
Error(TextMessage)
Example:
:@UI.Error("This
is an error message")
<return
to top>
Prompt
Informational Message
Format:
Info(TextMessage)
Example:
:@UI.Info("This
is an informational message")
<return
to top>
Prompt
Warning Message
Format:
Warn(TextMessage)
Example:
:@UI.Warn("This
is a warning message")
<return
to top>
Prompt
Confirmation Dialog
Format:
Confirm(TextMessage, CommandYes,
CommandNo)
Example:
:@UI.Confirm("Are
you sure?", "YesCmd", "NoCmd")
<return
to top>
Prompt
for Date
Format:
Date(TextMessage, DefaultDate)
Example:
:@UI.Date("Enter
birthdate", Now)
<return
to top>
Prompt
for Time
Format:
Time(TextMessage,
DefaultTime)
Example:
:@UI.Time("Enter
Alarm time", Now)
<return
to top>
Prompt
List
Format:
List(TextMessage, DefaultValue,
CommaDelimitedList)
Example:
:@UI.List("Select
color","Red", "Black,White,Red,Green,Blue")
<return
to top>
Prompt
Combo List
Format:
Combo(TextMessage,
DefaultValue, CommaDelimitedList)
Example:
:@UI.Combo("Select
color","Red", "Black,White,Red,Green,Blue")
<return
to top>
Prompt
Combo Edit List
Format:
ComboEdit(TextMessage,
DefaultValue, CommaDelimitedList)
Example:
:@UI.ComboEdit("Select
color","Red", "Black,White,Red,Green,Blue")
<return
to top>