Home > Enhancing Scripts > Adding Dialog Boxes

Adding Dialog Boxes

In WinTask x64, you can create dialog boxes that can be inserted anywhere in the script. At replay, the dialog box is displayed and the user can select the desired options proposed by the dialog.

WinTask x64 includes a dialog box designer tool which works the same way as in other any development tool. WinTask x64 provides you with a common set of components: input fields, list boxes, radio buttons, checkboxes, and so on. It lets you customize the components as you wish, arrange them within the dialog box, change their size, look style and so on. You can also create event handlers for dialog box components in order to process events that are raised by them.

To create a dialog box, select Insert/Dialog box/New menu option in WinTask x64 Editor window. A dialog box is displayed without no controls (except an OK button) and a Controls window lists the components you can add:

A right mouse click on this dialog box displays a menu:

You can add one of the nine available controls to the dialog box by selecting Control option in this menu or you can use directly the Control Palette window: select one control icon and click in the Dialog box at the position where to add the control. The available Controls are:

 Icon     Result
  Add a Button 
   Add a Text
   Add an Edit box
   Add a Group box
   Add a Checkbox
   Add a Radio button
   Add a Combobox
   Add a Listbox
   Add an Icon

You can modify the title of the dialog box by right clicking in the dialog box and you select Properties menu option. The Dialog box Properties dialog is displayed:

To generate in the script the dialog box statements, close the dialog box definition by clicking the x icon  or right click in the dialog box and select Transfer definition menu option. The statements
rem CallDialog Dialog

are inserted into the script.

Move the line rem CallDialog Dialog at the line where you want to display the dialog box. Delete the rem word to keep only CallDialog Dialog (rem function comments the line)

You can modify an existing dialog box by selecting the BEGINDIALOG...ENDDIALOG statements inside the script and then in Insert menu, you select Dialog box/Modify existing

See also
Dialog Statements Details