'If WindowTitle contains: [decimal], [integer], [none], [phone] or [text] the input type will be set to it and that text removed from the WindowTitle
Sub Ask(WindowTitle As String, Body As String, Default As String) As String
Dim Dialog As InputDialog, Value As Int
Dialog.Input = Default
WindowTitle = InputType(Dialog, WindowTitle, "decimal", Dialog.INPUT_TYPE_DECIMAL_NUMBERS)
WindowTitle = InputType(Dialog, WindowTitle, "integer", Dialog.INPUT_TYPE_NUMBERS)
WindowTitle = InputType(Dialog, WindowTitle, "none", Dialog.INPUT_TYPE_NONE)
WindowTitle = InputType(Dialog, WindowTitle, "phone", Dialog.INPUT_TYPE_PHONE)
WindowTitle = InputType(Dialog, WindowTitle, "text", Dialog.INPUT_TYPE_TEXT)
Value = Dialog.Show(Body, WindowTitle, "OK", "CANCEL", "", Null)
If Value = DialogResponse.POSITIVE Then Return Dialog.Input.Trim
End Sub
Sub InputType(Dialog As InputDialog, WindowTitle As String, Key As String, Value As Int) As String
If WindowTitle.Contains("[" & Key & "]") Then
Dialog.InputType = Value
WindowTitle = WindowTitle.replace("[" & Key & "]", "")
End If
Return WindowTitle
End Sub