Unhide Window Action Icon

Unhide Window

Declaration

<AMWINDOWUNHIDE WINDOWCLASS="text" WINDOWHANDLE="text" ALLOWHIDDEN="yes/no" WINDOWHANDLEVARIABLE="text (variable name)" WINDOWCLASSVARIABLE="text (variable name)" WINDOWTITLEVARIABLE="text (variable name)" RESULTDATASET="text (dataset name)" AM_DESCRIPTION="text" />

See Also

Focus Window | Maximize Window | Minimize Window | Restore Window | Hide Window | Resize Window | Move Window | Wait for Window | End Process

Description

Exposes a window that was previously hidden with the use of the Hide Window action. Unhiding a hidden window causes the window to become visible on the desktop so that it can be seen and interacted with.

NOTE: Interactive actions such as Send Keystrokes or Click Mouse cannot be sent to hidden windows. The only way to access a window that has been hidden is to Unhide it first and make certain it is Focused (placed in front of all other windows). This action also focuses the exposed window, therefore, interactive steps can immediately access  it without the use of a Focus Window step.

Practical Usage

Generally used to make visible a window that has been previously hidden by the Hide Window action or opened in a hidden state by the Run action with the Initial window state parameter set to Hidden.

Parameters

General Properties

To select a currently open window, you may perform one of the following:

  1. Drag the AutoMate icon to the desired window. This populates the Window title must be, Window class must be and Window handle must be parameters with the appropriate values.

  2. Click the drop-down arrow associated with the Window title must be and/or Window class must be parameters and select the desired title/class from the list that appears.

Property

Type

Req'd

Default

Markup

Description

Window title must be

Text

Yes

*

  1. WINDOWTITLE="Untitled - Notepad"

  2. WINDOWTITLE="*Internet Explorer*"

If enabled, specifies the title of the window to unhide. This value is case-insensitive. A Window title is required because without this parameter the action would have to search every control of every single Window on the system which would take an unacceptable amount of time. This parameter supports wildcards (* and ?), for example "*Internet Explorer* would include all Windows containing that text.

NOTE: If this parameter is left blank, the action assumes it is searching for a Window title that is blank - to ignore the Window title, use *.

Window class must be

Text

No

*

WINDOWCLASS="Outlook Express Browser Class"

If enabled, specifies the class of the Window to unhide. This value is case-insensitive. A window class is a set of attributes that the system uses as a template to create a window. Every window is a member of a window class. All window classes are process specific. This parameter supports wildcards (* and ?), for example "*Internet Explorer* would include all window classes containing that text.

NOTE: If this parameter is left blank, the action assumes it is searching for a Window class that is blank - to ignore the Window class, use *.

Window handle must be

Number

No

0

WINDOWHANDLE="555735"

If enabled, specifies the handle of the Window to unhide. If set to 0 or omitted, this parameter is ignored. The window handle is code that uniquely identifies a window.

Contents Properties

The Contents tab contains standard window dissection parameters used to describe controls or text inside a window. These parameters are documented under Window Dissection Parameters and can be used to define additional window characteristics used to determine a matching window.

To specify additional window characteristics, enable the option Window must contain the object(s), click the Add button and drag the AutoMate icon to the desired window object or control. The "Object Description" segment becomes populated with the characteristics of the selected object. Click the Edit button to access/edit the following properties:

Property

Type

Req'd

Default

Markup

Description

Object type must be

Yes/No

Yes

Yes

CHECKOBJECTTYPE="YES"

If set to YES, specifies that the value populated in the Object type parameter will be examined when determining a matching object. If set to NO, the Object type parameter is ignored.

Object type (Text-box)

Text

Yes

(Empty)

OBJECTTYPE="PushButton"

The type of object or control that should be examined. This parameter is ignored if the Object type must be parameter is set to NO.

Object class must be

Yes/No

No

No

CHECKOBJECTCLASS="YES"

If set to YES, specifies that the value populated in the Object class parameter will be examined when determining a matching object. If set to NO the Object class parameter is ignored.

Object class (text-box)

Text

No

(Empty)

OBJECTCLASS="SysTreeView32"

The object class that should be examined. This parameter is ignored if the Object class must be parameter is set to NO.

Object name must be

Yes/No

No

No

CHECKOBJECTNAME="YES"

If set to YES, specifies that the value populated in the Object name parameter will be examined when determining a matching object. If set to NO the Object name parameter is ignored.

Object name (text-box)

Text

No

(Empty)

OBJECTNAME="Cancel"

The object name that should be examined. This parameter is ignored if the Object name must be parameter is set to NO.

Object value must be

Yes/No

No

No

CHECKOBJECTNAME="YES"

If set to YES, specifies that the value populated in the Object value parameter will be examined when determining a matching object. If set to NO the Object value parameter is ignored.

Object value (text-box)

Text

No

(Empty)

OBJECTVALUE="1"

The object value that should be examined. This parameter is ignored if the Object value must be parameter is set to NO.

Object position must be

Yes/No

No

No

CHECKOBJECTPOSITION="YES"

If set to YES, specifies that the X and Y coordinates will be examined when determining a matching object. If set to NO, the position of the object is ignored.

NOTE: The X and Y coordinates are relative to the Window specified in the Window title must be parameter (not the screen).

Position X

Text

No

(Empty)

OBJECTXPOS="80"

The X coordinate position of the object relative to the window specified in the Window title must be parameter. To specify variable coordinates, use wildcard characters (i.e. * or ?). This parameter is ignored if the Object position must be parameter is set to NO.

Position Y

Text

No

(Empty)

OBJECTYPOS="90"

Specifies the Y coordinate position of the control relative to the Window specified in the Window title must be parameter. To specify variable coordinates, use wildcard characters (i.e. * or ?). This parameter is ignored if the Object position must be parameter is set to NO.

Advanced Properties

Property

Type

Req'd

Default

Markup

Description

Include hidden windows

Yes/No

No

No

ALLOWHIDDEN="YES"

If set to YES, specifies that hidden (non-visible) windows should be included in the window search. By default, hidden windows are not searched.

Populate variable with window title

Text

No

(Empty)

WINDOWTITLEVARIABLE=VarName"

If enabled, specifies the name of an already existing variable that should be populated with the title of the window that was unhidden.

Populate variable with window class

Text

No

(Empty)

WINDOWCLASSVARIABLE="VarName"

If enabled, specifies the name of an already existing variable that should be populated with the class of the window that was unhidden.

Populate variable with window handle

Text

No

(Empty)

WINDOWHANDLEVARIABLE="VarName"

If enabled, specifies the name of an already existing variable that should be populated with the handle of the window that was unhidden.

Create and populate dataset

Text

No

(Empty)

RESULTDATASET="DatasetName"

The name of a dataset to be created and populated with window data from the window that was unhidden. More on the fields that this dataset creates can be found under Notes below. More about this dataset can be found below under Notes.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab allows you to select/omit specific errors that should cause a particular step to fail.

More on Error Causes properties

On Error Properties

The On Error tab allows you to determine what the task should do if a particular step encounters an error.

More about On Error properties

Notes

Datasets

A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).

Name

Type

Return Value

theDataset.Title

Text

Returns the window title of the window that was unhidden.

theDataset.Class

Text

Returns the class of the window that was unhidden.  

theDataset.Handle

Number

Returns the handle of the window that was unhidden.

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Window Dissection™ Technology

This action contains a subset of Network Automation's unique "Window Dissection Technology".

More on Window Dissection

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: This task will perform the following Window related actions:

 

<AMRUN FILE="Notepad" />

<AMSHOWDIALOG MESSAGE="The next step will minimize the Notepad window." />

<AMWINDOWMINIMIZE WINDOWTITLE="*notepad*" />

<AMSHOWDIALOG MESSAGE="The next step will maximize the Notepad window." />

<AMWINDOWMAXIMIZE WINDOWTITLE="*notepad*" />

<AMSHOWDIALOG MESSAGE="The next step will restore the Notepad window to its original size." />

<AMWINDOWRESTORE WINDOWTITLE="*notepad*" />

<AMSHOWDIALOG MESSAGE="The next step will move the Notepad window to the upper left corner of the screen." />

<AMWINDOWMOVE WINDOWTITLE="*notepad*" />

<AMSHOWDIALOG MESSAGE="The last step will close the Notepad window." />

<AMWINDOWCLOSE WINDOWTITLE="*Notepad*" />

 

↑ Top of Page