Dialog

Here are the dialog's settings as they appear on the "double-click" Properties dialog.

There are three tabs on the Properties dialog:

Settings

Attributes

Script

Settings Tab

Dialog

Name:

The unique name that is used to identify this dialog.

Background

Use custom settings

Checking this checkbox will allow you to change the look of your dialog background. If this checkbox is unchecked, the dialog background will be the default background color for windows applications.

Note: If you skin your application, the default background color will come from your skin file.

Solid color

Cover the background with a single, solid color. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Gradient

Cover the background with a 2-color gradient. You can click on both of the select buttons to bring up color choosers.
(A smooth transition from one color at the top of the dialog, to a second color at the bottom of the dialog.)

Image

Display an image as the background. The image will be resized to fit the dialog.

File:

The image that will be used as the background for this dialog. Click the browse button to select an image file.

Note: This setting is only available when the "Image" background is selected.

Fit to page

Resize or stretch the image to cover the entire dialog. (This may cause some images to appear distorted.)

Tile

Cover the background with copies of the image placed side-by-side and top-to-bottom, like tiles on a floor.

Actual size

Display the image using it's original dimensions. The image will be positioned in the top left hand corner of the dialog.

Background color:

The color to use behind the image if the image does not cover the entire dialog. Click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Attributes Tab

General

Window title:

The text that will be displayed in the title bar of the dialog's window.

Movable

Make the dialog window "movable." If the Standard style is selected, this means the user can left-click the title bar and drag the dialog window around their screen. If the Flat style is selected, the user can left-click on the dialog surface and drag it around their screen.

Always on top

Make the dialog window always appear on top of all other windows on the desktop. The window will remain on top even if the user switches to another application.

Dimensions

Dialog size (presets):

The size that will be used for the dialog, in pixels. Choose from:

Tiny

Make the dialog 200 pixels tall by 320 pixels wide.

Small

Make the dialog 300 pixels tall by 480 pixels wide.

Medium

Make the dialog 425 pixels tall by 630 pixels wide. (The largest size that will fit on a standard 640x480 display.)

Large

Make the dialog 545 pixels tall by 790 pixels wide. (The largest size that will fit on a standard 800x600 display.)

Extra Large

Make the dialog 713 pixels tall by 1014 pixels wide.

Huge

Make the dialog 969 pixels tall by 1270 pixels wide.

Custom

Specify a custom size.

Width:

The width of the dialog surface, in pixels.

Note: This setting is only available when the "Custom" dialog size is selected.

Height:

The height of the dialog surface, in pixels.

Note: This setting is only available when the "Custom" dialog size is selected.

Resize

Window is resizable

Make the dialog window resizable. Enabling this option allows the user to resize the dialog window either by dragging the title bar, or by pressing the maximize/restore button. This option only applies to dialogs using the Standard and Bordered window styles.

Tip: To manipulate the size, position, visibility, etc. of objects when the dialog is resized, use the On Size event of the dialog's Script tab.

Min. width:

The minimum dialog width to use at runtime if the window is resizeable.

Note: This is the minimum dialog width, not the window width.

Min. height:

The minimum dialog height to use at runtime if the window is resizable.

Note: This is the minimum dialog height, not the window height.

Style

Standard

A title bar and border will be displayed for the dialog window.

Bordered

A border will be displayed around the dialog window with no title bar.

Flat

The dialog will be displayed without a title bar or border.

Custom mask

Make certain parts of your dialog's window transparent. You can use this option to make a custom window shape for your dialog.

To specify the areas that you want to make transparent, you need to create a transparency mask file in your favorite drawing program.

A transparency mask file is just an image where a single color represents the parts that you want to make transparent. Picture this image as being invisibly "placed over" your dialog's window, like a mask or a stencil.

In AutoPlay, the transparent parts of the mask should all be solid black. Wherever solid black appears in the mask image, the corresponding part of the window will be made transparent. The transparency mask acts like a "cookie cutter," cutting holes in the dialog's window so the user's desktop can show through.

Click the Browse button to select an image file.

Note: When some of these options are used, the controls that normally appear on the title bar—such as the "X"-shaped close button in the upper right corner—will not be available. Make sure you provide some other way for your users to exit from the dialog. (For example, you could have an "Exit" button somewhere on the dialog.) You can also exit the dialog using the Escape key, or ALT+F4.

Fit custom mask to window

Take your transparency mask image and resize it to fit the dialog. The original image dimensions will be used to mask the dialog if this option is not selected.

Options

Custom icon

Show a custom icon in the top left corner of your dialog window if the Standard style is selected.

Click the browse button to select a standard icon (.ico) file.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this dialog's events.

Each dialog supports the following events:

On Preload

The actions that will be performed right after the dialog is created in memory, before the dialog (or any of the objects on it) is shown.

You can use this event to set the initial visibility of each object on the dialog. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the dialog is displayed, you can avoid any visible "flickering" as the objects are hidden or shown.)

Note: Some actions (especially object-related actions) may not work properly on this event because it occurs before any of the dialog's objects are "created." If an action doesn't work at On Preload, try it at On Show instead.

On Show

The actions that will be performed whenever the dialog is opened (after the dialog is shown and the objects have been drawn).

On Close

The actions that will be performed whenever the dialog is closed.

Tip: If you need to prevent the user from closing the dialog or want to add a confirmation message, you can use the built-in function QueryAllowDialogClose.

On Timer

The actions that will be performed whenever a dialog timer fires. You can start a dialog timer using a DialogEx.StartTimer action.

The following event variable is automatically set whenever this event is triggered:

e_ID

(number) The numeric ID of the dialog timer that has fired. This is the same ID that was passed to the DialogEx.StartTimer action that created the dialog timer. When using multiple timers, you can differentiate between them using if/elseif statements.

On Audio

The actions that will be performed whenever an audio channel's state changes on the dialog. For example, if a channel's audio is paused, this event will be triggered.

The following event variables are automatically set whenever this event is triggered:

e_Channel

(number) The audio channel whose state has changed. One of the following channel values will be returned:

CONSTANT

VALUE

DESCRIPTION

CHANNEL_BACKGROUND

5

Background audio channel.

CHANNEL_EFFECTS

0

Effects channel (used for mouse over, down, and click sounds).

CHANNEL_NARRATION

6

Narration channel (used for voice overs).

CHANNEL_USER1

1

User channel 1.

CHANNEL_USER2

2

User channel 2.

CHANNEL_USER3

3

User channel 3.

CHANNEL_USER4

4

User channel 4.

CHANNEL_ALL

-3

All audio channels.

e_State

(string) The state that the audio channel has changed to. One of the following states will be returned:

VALUE

TYPE

DESCRIPTION

Finish

string

The audio channel's track reached it's end.

Pause

string

The audio channel was paused using the Audio.Pause action.

Play

string

The audio channel was played using the Audio.Play action

Stop

string

The audio channel was stopped using the Audio.Stop action.

On Size

The actions that will be performed whenever the dialog changes size. For example, if the user maximizes the dialog's window, this event will fired.

The following event variables are automatically set whenever this event is triggered:

e_WindowWidth

(number) The width, in pixels, of the entire dialog window, including the border and title bar.

e_WindowHeight

(number) The height, in pixels, of the entire dialog window, including the border and title bar.

e_DialogWidth

(number) The width of the current dialog.

e_DialogHeight

(number) The height of the current dialog.

e_Type

(number) The type of resize that has occurred. Choose from:

CONSTANT

VALUE

DESCRIPTION

SIZE_RESTORED

0

The dialog was either restored from being maximized or minimized or was resized normally.

SIZE_MINIMIZED

1

The dialog was minimized to the taskbar.

SIZE_MAXIMIZED

2

The dialog was maximized.

Tip: To make your dialog resizable, enable the resizable option on the Attributes tab of the Dialog's properties.

On Key

The actions that will be performed whenever the dialog window has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Mouse Button

The actions that will be performed when a mouse button is clicked within the bounds of your dialog.

The following event variables are automatically set whenever this event is triggered:

e_Type

(number) A number containing the type of mouse-button behaviour:

CONSTANT

VALUE

DESCRIPTION

LEFT_BUTTON_DOWN

0

Left mouse button has been pressed.

LEFT_BUTTON_UP

1

Left mouse button has been released.

RIGHT_BUTTON_DOWN

2

Right mouse button has been pressed.

RIGHT_BUTTON_UP

3

Right mouse button has been released.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the dialog.

On Mouse Move

The actions that will be performed when the mouse moves within the bounds of your dialog.

The following event variables are automatically set whenever this event is triggered:

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the dialog.

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while the dialog has focus.

The following event variables are automatically set whenever this event is triggered:

e_Flags

(table) A table containing five boolean values that describe which modifier keys or buttons were held down when the mouse wheel event was fired.

There are five true/false values in the table: shift key, ctrl key, left mouse button, middle mouse button, and right mouse button. You can access these values as e_Flags.shift, e_Flags.ctrl, e_Flags.LButton, e_Flags.MButton, and e_Flags.RButton.

e_Delta

(number) The distance that the mouse wheel was rotated. A negative value indicates that the mouse wheel was rotated backward towards the user, and a positive value indicates that the mouse wheel was rotated forward away from the user. This can be altered by the user via their mouse software. This value will usually be 120 or -120, however may be multiples or divisions of 120 depending upon the mouse vendor.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the top of the dialog.