From EventGhost
Jump to: navigation, search
Plugin Information
Name Window
Authors Bitmonster
Current Version1 1.0.0
Official Website N/A
Forum Page [1]
Source Code [2]
Type Core
Source Bundled
Minimum EventGhost Version N/A

1 This is the current version as of this page's last update. Newer versions may be available.

This wiki page may be out of date. Always consult the above website and forum links for possibly updated information.

This plugin provides actions that are related to the control of windows on the desktop, like finding specific windows, move, resize and send keypresses to them.


This plugin has no configuration options.


This plugin does not generate any events.


Find a Window

Setting Default {·} Description
Only match frontmost window False N
Search invisible items also False N If checked, will search for hidden/invisible windows. Takes longer.
Stop macro if target is not found True N
Stop macro if target is found False N
Only return N'th match 1 N When there are multiple windows meeting the search criteria, this lets you specify which of the windows to use.
Wait up to N seconds for the window to appear 0 N If the window isn't found right away, pauses the macro for up to this long to allow the window to appear.

This action is used to choose a window (the target) for the following actions to act on. Your macro would typically have this action before any of the following ones, though it doesn't have to; if you use one of the following actions without calling this one first, it will simply target whichever window is currently active.

The configuration dialog gives you several ways to choose the window you want to find when the macro runs. You can select a window that's currently open, select a window from the list of running programs, or specify the window's program, name, and class manually.

The more specific you make your window matching criteria, the more likely you will match the window you want when your macro is run.

Technical Details

In MS Windows, a "window" is anything that uses the Window class. This includes window elements such as text-entry fields, buttons, and so on. This means that, when you use Action.pngSend Keystrokes, you can direct keyboard input directly to the window element that you want, rather than just the window in general, and you should do this whenever possible.

For example, if you wish to use Action.pngFind a Window to find a Notepad window and enter text into it, you can fill in the program name, window name and class, or any combination of the three. But if you don't also specify a child class of "edit", your macro will not send keystrokes to the text editing area of Notepad.

The above only applies to windows that use the standard Windows API for creating their interface. Many programs (such as Firefox) use their own libraries to draw their interface, so you cannot direct input to a specific control as easily.

Always On Top

This action lets you make target window always appear over top of other windows. You can set, clear, or toggle this property on the window.

Bring to Front

Causes the target window to appear on top of other windows.


Simply closes the target window.

Dock Window

Setting Default {·} Description
Vertical Position No change N Whether to move the window to the top, center, or bottom of the desktop.
Horizontal Position No change N Whether to move the window to the left, center, or right of the desktop.

This action moves the target window to the specified edge(s) of the screen. It does not resize the window in the process.

Grab Text Item(s)

Setting Default {·} Description
Return only selected item(s) False N If checked, the plugin will attempt to only grab text from selectable items, such as combo boxes.

This plugin attempts to grab text that is displayed in the target window, and return it in eg.result.


Maximizes the target window, so it fills the screen.


Minimizes the target window to your Windows taskbar.

Minimize to Tray

Minimizes the target window to your Windows system tray (usually found beside the clock on your taskbar).


Moves the target window to the coordinates you specify, on the monitor you specify. Does not resize the window in the progress.


Sets the size of the target window to the width and height you specify. Does not move the window in the process; the top left corner of the window will stay where it was.


Restores the target window to its former state. Effectively, this undoes a Action.pngMaximize, Action.pngMinimize, or Action.pngMinimize to Tray action.

Send Keystrokes

Setting Default {·} Description
Text to type (empty) N The keystrokes to send. See details at right.
Use alternate method to emulate keypresses False N If checked, the keystrokes sent will not be modified by any keys you're currently holding down (such as the Shift key).
Trigger mode Down+Up N Specify whether to simulate only holding down the key, only releasing it, or pressing and releasing it immediately.

This plugin sends a series of keystrokes to the target window. Any plain text you enter in the "Text to type" will be "typed" by the plugin. You can also enter special keystrokes to be pressed by wrapping them in {curly braces}. The full list of special keystrokes is available in the Description tab of the plugin's configuration dialog, and the dialog also includes a tool to facilitate entering these special keys for you.

For tips on sending keyboard input to specific parts of the window (such as a text-entry field), see the Technical Details section of Action.pngFind a Window above.

Send Message

Setting Default {·} Description
wParam 0 N
lParam 0 N
Use PostMessage instead of SendMessage False N

This is an advanced action, used to send a low-level message to the target window. It can do this using either the SendMessage function (default) or the PostMessage function. SendMessage sends the message to the target window right away, and waits for the window to respond; PostMessage puts the message in the window's queue and continues your macro without waiting for the window to react.

For more information about the types of messages that can be sent to windows, see this Microsoft KnowledgeBase article.

See Also