Window Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Window Operations >

Window Operations

GSW. - Get Special Window

Previous Top Next


MiniRobotLanguage (MRL)

 

GSW. Command

Get Special Window

 

 

Intention

 

The GSW. Command can be used to return the handle of special windows, like the desktop, the Traybar or the Quick-Launch.

 

The handle is returned and the window is been immediately located.

 

If the handle can not be returned, because - for example - there is no explorer loaded, the command returns a zero.

 

Using this command is safer then locating these windows in another way, because it uses internal methods that are mostly safer for international or newer windows versions.

 

To be safe, test your script on the OS that it finally should run on.

 

Usage is as simple as:

 

' Click the volume icon in the System-Notification Area.

GSW.sb|$$RET

AGR.43|Volume

MLC.

 

 

 

Syntax

 

 

GSW.[P1][|P2]

 

 

Parameter Explanation

 

P1 - (optional) specifies the window that shall be returned,

     out of the following:

 

"shell desktop","sd" - locate the shell-desktop-Top-Window. In the example

     below it has the handle 65790. On a dual-screen system, this window has the

     X-Size over both screens, and the Y-Size of the larger of both screens.

graphic

 

 

"desktop","dt" - locates the actual Input Desktop. On a dual-screen system it covers

  only the main desktop with the taskbar and the start-menu. Its not visible in the windows

 -analyzer when you move the mouse over the desktop.

 

"sc","shell child" - locate the shell-desktop-Top-Window and then the next

       child-window. In the example above it has the handle 65796 and the

       window-class "SHELLDLL_DefView".

 

 

"dtl","desktop listview" - locate the shell-desktop-Top-Window and then

     the desktop-listview. In the example above it has the handle 65800 and the

       window-class "syslistview32".

 

 

"tw","tray" - locate the Shell-Tray-Top-Window. In the example below it has the

      handle 196698 and the window-class "Shell_TrayWnd". On the primary desktop

      this window covers the complete taskbar.

 

graphic

 

"tb","traybar"  - locate the Desktop Traybar-User Notification Area-Toolbar-

   Window. This is the window that contains the Traybar Notification-Icons. In the example

   above it has the handle 65726 and the window-class     "toolbarwindow32".

 

 

"sb","start button" - locate the Shell-Tray-Top-Window and then the

    START-Button.. This option may currently only work under Windows XP.

 

 

"ql","quick launch" - locate the Shell-Tray-Top-Window and then the

     Quicklaunch Area. This option may only work under Windows XP.

 

graphic

 

 

"ab","application bar"- locate the Shell-Tray-Top-Window and then the application

     run-area Taskbar).  In the picture below that is the window wit hthe handle 65718 and

    the class "MSTaskSwWClass.". The window on Level 3 seems to be a toolbar on XP

    and a "MSTaskListWClass" under Windows 7.

 

graphic

 

 

P2 - (optional) Variable P2 is been loaded with the Handle of the

    Window if it is found. If the window is not found a zero is

    returned. If P2 is omitted, the result is been placed on TOS.

 

 

If the window is found, it is localized.

 

 

 

Example

 

' Click the volume icon in the System-Notification Area.

GSW.sb|$$RET

AGR.43|Volume

MLC.

 

 

 

 

Remarks

 

Tested with Windows XP and Windows 7. There may be changes needed for Windows 8 and higher.

 

 

 

Limitations:

 

-

 

 

 

See also:

 

    ! SCW - Search-Child-Window

    !. STW. - Description

    GRW. - Get Related Window

    GCT. - Get-Childs-TopWindows