Set Window State action
The Set Window State action changes the state of its target window (dialog box or control). It can show, hide, enable, or disable the target window, change the window caption, or perform a number of other actions. See Window actions below for the complete list.
Tip: You can use also Dialog control conditions to enable or disable dialog box controls dynamically.
Window actions
The following window state actions are available:
State action | Value/Text | Description |
---|---|---|
Show window | n/a | Show the target window. |
Hide window | n/a | Hide the target window. |
Minimize window | n/a | Minimize the target window. This action only has effect for top-level windows. |
Maximize window | n/a | Maximize the target window. This action only has effect for top-level windows. |
Restore window | n/a | Restore the target window to its original size and position after it was minimized or maximized. This action only has effect for top-level windows. |
Enable window | n/a | Enable the target window. |
Disable window | n/a | Disable the target window. |
Set Read-only | n/a | Make the target window read-only. This action only has effect for EditText and RichText controls. |
Set Editable | n/a | Make the target window editable. This action only has effect for EditText and RichText controls. |
Set focus | n/a | Set the keyboard focus to the target window. This action only has effect for controls that accept keyboard input. |
Click button | n/a | Simulate a button click on the target window. The target window must be a CheckBox, PushButton, or RadioButton control, or a StaticText control with its Type set to Hyperlink; depending on the target window type, this causes a selection or some other action to take place as if the user clicked on the control. |
Select item | Value of the item to select | Select the item corresponding to the Text/Value value in the target window. The target window must be a CheckBox, ComboBox, ListBox, or RadioButton control. In the last case, you must specify the first radio button control in a group of radio buttons, regardless of the item that you want to select. |
Set window text | New window text | Set the caption of the target window to the Text/Value value. The target window must be a dialog box with a title bar or a control that contains text (for example, an EditText, GroupBox, or StaticText control, but not a Bitmap control). |
Insert item | Text to insert | Insert the text from the Text/Value field in the target window list. The target window must be a ComboBox or ListBox control. The new text is added at the end of the list, unless the control's Sorted attribute is set; in that case, the new text will be added in its sorted position. Note: In contrast to preset list values, only a user-visible text is inserted if you use Insert item. There is no corresponding list value and the control will use the user-visible text to update its linked variable if the user selects a text-only list item. |
ShellExecute | Verb | Request the target window to save its contents to a temporary file, then invoke the Win32 ShellExecute function with the passed-in verb. Common verbs are:
You can use this action, for example, to open the Readme or License agreement texts in an external editor or to print them. This action currently only has effect for RichText controls. Note: This action requires that an appropriate shell handler is registered for the content and verb. This may not always be the case; for example, Core installations have very few file type associations registered. |
Enable Marquee | n/a | Enables scrolling marquee display in a ProgressBar control. The target window must be a ProgressBar control; if used with other types of windows, the effect is unpredictable. Note: This action has no effect on Windows XP, Windows Server 2003, or earlier versions of Windows. |
Disable Marquee | n/a | Disables scrolling marquee display in a ProgressBar control. The target window must be a ProgressBar control; if used with other types of windows, the effect is unpredictable. Note: This action has no effect on Windows XP, Windows Server 2003, or earlier versions of Windows. |
Attributes
The following attributes and options are available.
Attribute | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Action name | Enter the name of the action. This name is only used in InstallMate and is not visible to the user. | ||||||||||
Window action | Select the desired window state action from the drop-down list. See Window actions for a complete list of available actions. | ||||||||||
Target window | Enter the name of the target window, or click ... (browse) to open the Select Dialog or Control dialog box that allows you to select the desired target window. | ||||||||||
Value/Text | Enter the localized text or value for the state action, or leave empty if the action doesn't require any. See Window actions for the actions that require additional text. Note: For the Select item action, you must specify the value of the item to select, not the user-visible list item text or caption. The following table shows the required values:
|
||||||||||
Condition | Enter the conditional expression that determines if the action will be executed, or leave empty for unconditional execution. | ||||||||||
Disabled | Check this box to disable the action. A disabled action is not included in the installer and not checked during the build. You can use this option to remove actions temporarily from your installer without permanently deleting them. Disabled actions are shown with a grayed-out icon. | ||||||||||
Platforms... | Click this button to open the Select Installation Platforms dialog box that allows you to select the Windows versions on which the action must be executed. This platform selection acts as an additional condition for the action. |