User Tools

Site Tools


function:WINDOW

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
function:WINDOW [2019/12/24 22:48]
JMichaelTX Clarify use of option parameters
function:WINDOW [2023/09/20 04:33] (current)
peternlewis
Line 1: Line 1:
-**The `WINDOW()` function returns the desired coordinate of the specified window**, and can have one or two parameters. \\ +====== ​WINDOW ​Function ======
-Like all [[:​Functions|Functions]],​ it can be used _only_ in a [[:​Text_Fields#​Numeric_Fields|numeric calculation field]].+
  
-  - **`WINDOW(Coordinate)`** +The WINDOW() function ​returns ​the desired coordinate of the specified ​window, ​and can have one or two parameters.
-    - 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(IndexCoordinate)`** +
-    - With two parameters, the first parameter specifies which window in the front application to operate on.+
  
 +====== Usage ======
  
 +  - WINDOW(Coordinate)
 +  - WINDOW(Index,​ Coordinate)
  
 +With two parameters, the first parameter specifies which window in the front application to operate on. With only one parameter, the *Index* is assumed to be the window of the Action in which the *WINDOW()* function is used (like the [[action:​Manipulate_a_Window|Manipulate a Window]] action), or the frontmost window if the Action does not refer to a window.
  
-The first parameter, `Index`, which is optional, may be:+====== Parameters ======
  
-* 0: the main or action ​window.+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, `Coordinate`,​ specifies the desired *coordinate* to be returned, and can be: The second parameter, `Coordinate`,​ specifies the desired *coordinate* to be returned, and can be:
Line 29: Line 30:
  
  
-===== See Also =====+====== See Also ======
  
-----+===== Actions =====
  
-=== Actions === +* [[action:​Manipulate a Window|Manipulate a Window]] ​action 
- +* [[action:​Move or Click Mouse|Move or Click Mouse]] ​action 
-* [[action:​Login Window|Login Window]] +* [[action:​Custom_HTML_Prompt|Custom HTML Prompt]] action
-* [[action:​Manipulate a Window|Manipulate a Window]] +
-* [[action:​Move or Click Mouse|Move or Click Mouse]]+
 * [[:​Actions|See all Actions]] * [[:​Actions|See all Actions]]
  
-=== Functions ===+===== Functions ​=====
  
-* [[function:MENUBARHEIGHT|MENUBARHEIGHT()]] +* [[MENUBARHEIGHT]] 
-* [[function:MOUSEBUTTON|MOUSEBUTTON()]] +* [[MOUSEBUTTON]] 
-* [[function:MOUSEX|MOUSEX()]] +* [[MOUSEX]] 
-* [[function:MOUSEY|MOUSEY()]] +* [[MOUSEY]] 
-* [[function:SCREEN|SCREEN()]] +* [[SCREEN]] 
-* [[function:SCREENCOUNT|SCREENCOUNT()]] +* [[SCREENCOUNT]] 
-* [[function:SCREENVISIBLE|SCREENVISIBLE()]] +* [[SCREENVISIBLE]] 
-* [[function:​WINDOWCOUNT|WINDOWCOUNT()]]+* [[SCREENINDEX]] 
 +* [[WINDOWCOUNT]]
 * [[:​Functions|See all Functions]] * [[:​Functions|See all Functions]]
  
-=== Tokens ===+===== Tokens ​=====
  
-* [[:​token:​FrontWindowName|%FrontWindowName%]] +* [[:​token:​FrontWindowName|%FrontWindowName%]] ​token 
-* [[:​token:​WindowName|%WindowName%]] +* [[:​token:​WindowName|%WindowName%]] ​token 
-* [[token:​WindowSize|%WindowSize%]]+* [[token:​WindowSize|%WindowSize%]] ​token
 * [[:​Tokens|See all Tokens]] * [[:​Tokens|See all Tokens]]
  
----- +===== 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?]]
- 
 - [[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://​forum.keyboardmaestro.com/​search?​q=WINDOW|Keyboard Maestro Forum topics about Window function]] - [[https://​forum.keyboardmaestro.com/​search?​q=WINDOW|Keyboard Maestro Forum topics about Window function]]
function/WINDOW.1577245730.txt.gz · Last modified: 2019/12/24 22:48 by JMichaelTX