KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Dialog Boxes - Example
Topic Summary: FYI- Using Dialog Boxes
Created On: 05/17/2022 03:51 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 05/17/2022 03:51 PM
User is offline View Users Profile Print this message

Author Icon
Junior Member

Posts: 40
Joined: 08/09/2019

The Dialog Box Editor is the next to last ICON in the MyCommands Editor.


To edit a Dialog Box highlight the Dialog Box code then click the Dialog Box Editor icon.

The sample code:


'#Language "WWB-COM"

Const   FirstName = "FirstName", _

    LastName = "LastName", _

    YourStreet= "2120 My Street", _

    YourCity = "MyCity", _

    YourPostalCode = "01234"

Sub Main

    Begin Dialog UserDialog 200,300,525,170,"Enter the Name and Address"


' Place the Dialog Box at Screen Coordinate x = 200, y = 300
' Size 525 (width) x 170 (height)


        Text 50,10,70,14,"First Name",.Text1,1

        Text 50,35,70,14,"Last Name",.Text2,1

        Text 10,60,110,14,"Street Address",.Text3,1

        Text 30,85,90,14,"City",.Text4,1

        Text 30,110,90,14,"Postal Code",.Text5,1


        TextBox 130,10,190,21,.FName

        TextBox 130,35,190,21,.LName

        TextBox 130,60,370,21,.Street

        TextBox 130,85,280,21,.City

        TextBox 130,110,280,21,.PCode


        OKButton 130,140,80,21
CancelButton 250,140,130,21

    End Dialog

    Dim NameAdr As UserDialog

    ''''''''''Prefill sample values''''''''''

' Assign dialog variable values (dialog name)DOT(variable name)

    NameAdr.FName = FirstName

    NameAdr.LName = LastName

    NameAdr.Street = YourStreet

    NameAdr.City = YourCity

    NameAdr.PCode = YourPostalCode

    Dialog NameAdr ' Show dialog

    ' React to pressing "OK" or "Cancel" button
    ' If Dialog(NameAdr) = -1 Then 'OK button pressed
    '   Add code to do something
    ' End If
End Sub


NOTE: if you copy/paste this code you have to edit the multiline Const statement so there are no blank lines


Further info see:

Dialog Instruction/Function (





Michael Noble
Using $20 USB Mic on adjustable arm ($30 total cost - 99.9% recognition). 


DPI - Windows 11 Pro for Workstations Latest Update / MS Office 2021 LTSC

KnowBrainer Speech Recognition » Commands, Scripts, and Macros - Dragon » Dialog Boxes - Example

32323 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 511 guests browsing this forum, which makes a total of 511 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.