This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
function:WINDOW [2016/05/14 12:59] alain add forum link + forum Google search |
function:WINDOW [2019/12/24 22:57] JMichaelTX |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | The WINDOW() function takes one or two parameters and returns information about a window. With one parameter, it refers to the window that that action is operating on in actions like the [Manipulate a Window](action:Manipulate a Window). If the action does not refer to a window, then the function refers to the main/focussed/front window. With two parameters, the first parameter specifies which window in the front application to operate on. | + | ====== WINDOW() Function ====== |
- | The first parameter may be: | ||
- | * 0: the main or action window. | + | **The `WINDOW()` function returns the desired coordinate of the specified window**, and can have one or two parameters. \\ |
+ | Like all [[:Functions|Functions]], it can be used _only_ in a [[:Text_Fields#Numeric_Fields|numeric calculation field]]. | ||
+ | |||
+ | ====== Usage ====== | ||
+ | |||
+ | - **`WINDOW(Coordinate)`** | ||
+ | - The `Index` is assumed to be the window of the Action in which the `WINDOW()` function is used (like the [Manipulate a Window](action:Manipulate a Window)), \\ OR, the frontmost window if the Action does not refer to a window. | ||
+ | - **`WINDOW(Index, Coordinate)`** | ||
+ | - With two parameters, the first parameter specifies which window in the front application to operate on. | ||
+ | |||
+ | |||
+ | ====== Parameters ====== | ||
+ | |||
+ | |||
+ | The first parameter, `Index`, which is optional, may be: | ||
+ | |||
+ | * 0: the frontmost window of the frontmost app. | ||
* Positive Number: the indexed window from front to back. | * Positive Number: the indexed window from front to back. | ||
* Negative Number: the indexed window from back to front. | * Negative Number: the indexed window from back to front. | ||
+ | * If this parameter is _not_ provided, then it is assumed to be the window of the Action in which the `WINDOW()` function is used, \\ OR, the frontmost window if the Action does not refer to a window. | ||
- | The second parameter specifies the desired *coordinate* and can be: | + | The second parameter, `Coordinate`, specifies the desired *coordinate* to be returned, and can be: |
* Left | * Left | ||
Line 18: | Line 34: | ||
* MidY | * MidY | ||
- | The WINDOW() function returns the desired coordinate of the specified window. | ||
- | ===== See Also ===== | + | ====== See Also ====== |
---- | ---- | ||
- | === Actions === | + | ===== Actions ===== |
+ | * [[action:Login Window|Login Window]] | ||
* [[action:Manipulate a Window|Manipulate a Window]] | * [[action:Manipulate a Window|Manipulate a Window]] | ||
* [[action:Move or Click Mouse|Move or Click Mouse]] | * [[action:Move or Click Mouse|Move or Click Mouse]] | ||
* [[:Actions|See all Actions]] | * [[:Actions|See all Actions]] | ||
- | === Functions === | + | ===== Functions ===== |
* [[function:MENUBARHEIGHT|MENUBARHEIGHT()]] | * [[function:MENUBARHEIGHT|MENUBARHEIGHT()]] | ||
Line 42: | Line 59: | ||
* [[:Functions|See all Functions]] | * [[:Functions|See all Functions]] | ||
- | === Tokens === | + | ===== Tokens ===== |
+ | * [[:token:FrontWindowName|%FrontWindowName%]] | ||
+ | * [[:token:WindowName|%WindowName%]] | ||
* [[token:WindowSize|%WindowSize%]] | * [[token:WindowSize|%WindowSize%]] | ||
* [[:Tokens|See all Tokens]] | * [[:Tokens|See all Tokens]] | ||
Line 49: | Line 68: | ||
---- | ---- | ||
- | ==== Forum ==== | + | ===== Forum ===== |
- [[https://forum.keyboardmaestro.com/t/send-the-front-most-window-to-back-bring-the-back-to-front/2226/19|Send the front most window to back? bring the back to front?]] | - [[https://forum.keyboardmaestro.com/t/send-the-front-most-window-to-back-bring-the-back-to-front/2226/19|Send the front most window to back? bring the back to front?]] | ||
Line 55: | Line 74: | ||
- [[https://forum.keyboardmaestro.com/t/i-need-a-conditional-if-there-are-two-monitors/3031/5|I need a conditional if there are two monitors]] | - [[https://forum.keyboardmaestro.com/t/i-need-a-conditional-if-there-are-two-monitors/3031/5|I need a conditional if there are two monitors]] | ||
- | - [[https://www.google.fr/search?q=site:forum.keyboardmaestro.com+Found+Image+condition|Keyboard Maestro Forum topics about Window function]] | + | - [[https://forum.keyboardmaestro.com/search?q=WINDOW|Keyboard Maestro Forum topics about Window function]] |