Automation Engine Script Guide > Introduction > First Steps > User-defined Dialogs

User-Defined Dialogs

Objectives:
- Outputting text in a dialog window
- Querying user values

Lesson 6

You can use AE's scripting language to create user-defined dialogs. You can output texts and/or query user values. To have dialogs displayed, activate the relevant object via a user interface (UserInterface or WebInterface).

In the first step, create a simple dialog that outputs text only. Use the script statements :BEGINREAD... :ENDREAD (specifies the beginning and end of a dialog window) in combination with :PRINT for this purpose.

Use the following scripting line:

:BEGINREAD
: PRINT "TEST"
:ENDREAD

It results in the following window:

In the second step, create a dialog that facilitates the input of data. The script element :READ can be used for this purpose (also referred to as READ mask).

The following example combines a :PRINT output and a :READ input in a dialog. The value is stored in a script variable (in this case, the variable is directly created by using the script element :READ). Finally, the variable is output in the activation protocol.

:BEGINREAD
: PRINT "Text input"
: READ &INPUT#,"00","Please enter a text."
:ENDREAD

:PRINT "User text: &INPUT#"