token:Window_Tokens
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| token:Window_Tokens [2019/07/05 07:45] – peternlewis | token:Window_Tokens [2020/09/01 00:03] (current) – Add FoundImage Token JMichaelTX | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~REDIRECT> | + | ====== Window Related Tokens ====== |
| + | |||
| + | This Wiki page receives the redirect for a number or windows related tokens: | ||
| + | |||
| + | * [[token:WindowName|%WindowName%]] and [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | |||
| + | Each of these text tokens return information about the specified window. | ||
| + | |||
| + | ==== Token Parameters ==== | ||
| + | |||
| + | The non-Front variants take a parameter indicating the window. | ||
| + | |||
| + | The parameter may be: | ||
| + | |||
| + | ^ Parameter ^ Meaning ^ | ||
| + | | Front or 0 | the focused/ | ||
| + | | Positive Number | the indexed window from front to back. | | ||
| + | | Negative Number | the indexed window from back to front. | | ||
| + | | All | All of the windows, one per line, from front to back. | | ||
| + | |||
| + | So for example, // | ||
| + | |||
| + | The Front variants are older versions that are equivalent to using Front as the parameter. | ||
| + | |||
| + | Like all coordinates in Keyboard Maestro, the WindowPosition and WindowFrame are from the top left corner of the main screen (the defined one with the menu bar on it, although this is less apparent now that the menu bar is on all monitors). | ||
| + | |||
| + | ==== WindowName (FrontWindowName) ==== | ||
| + | |||
| + | The `%WindowName%` tokens returns the window title of the specified window. | ||
| + | |||
| + | `%FrontWindowName%` is a synonym for `%WindowName%Front%` and may be used interchangeably. | ||
| + | |||
| + | ==== WindowFrame (FrontWindowFrame) ==== | ||
| + | |||
| + | The `%WindowFrame%` tokens returns the location of the window in pixels of left, top, width, and height of the window in a comma-delimited numerical string. | ||
| + | |||
| + | `%FrontWindowFrame%` is a synonym for `%WindowFrame%Front%` and may be used interchangeably. | ||
| + | |||
| + | Example Return of these tokens: | ||
| + | |||
| + | ``` | ||
| + | 228, | ||
| + | |||
| + | left, | ||
| + | ``` | ||
| + | |||
| + | ==== WindowPosition (FrontWindowPosition) ==== | ||
| + | |||
| + | The `%WindowPosition%` tokens returns the location of the window in pixels of left and top of the window in a comma-delimited numerical string. | ||
| + | |||
| + | `%FrontWindowPosition%` is a synonym for `%WindowPosition%Front%` and may be used interchangeably. | ||
| + | |||
| + | Example Return of these tokens: | ||
| + | |||
| + | ``` | ||
| + | 228,23 | ||
| + | |||
| + | left,top | ||
| + | ``` | ||
| + | |||
| + | ==== WindowSize (FrontWindowSize) ==== | ||
| + | |||
| + | The `%WindowSize%` tokens returns the size of the window in pixels of width and height of the window in a comma-delimited numerical string. | ||
| + | |||
| + | `%FrontWindowSize%` is a synonym for `%WindowSize%Front%` and may be used interchangeably. | ||
| + | |||
| + | For example, these tokens return values for:\\ width, | ||
| + | |||
| + | |||
| + | ``` | ||
| + | 1314,1173 | ||
| + | ``` | ||
| + | |||
| + | ==== Accessing Window, Screen, & Image Coordinates ==== | ||
| + | |||
| + | When a Window, screen token or a [[token: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | This produces the following results, in the Display Action: | ||
| + | |||
| + | ``` | ||
| + | Window Frame: | ||
| + | |||
| + | Left: | ||
| + | Top: 66 | ||
| + | Width: | ||
| + | Height: | ||
| + | |||
| + | Right: | ||
| + | Bottom: | ||
| + | MidX: | ||
| + | MidY: | ||
| + | ``` | ||
| + | |||
| + | For WindowPosition, | ||
| + | |||
| + | === Screen/ | ||
| + | |||
| + | |||
| + | * Left | ||
| + | * Right | ||
| + | * Top | ||
| + | * Bottom | ||
| + | * Width | ||
| + | * Height | ||
| + | * MidX | ||
| + | * MidY | ||
| + | |||
| + | ===== See Also ===== | ||
| + | |||
| + | === Functions === | ||
| + | |||
| + | * [[function: | ||
| + | * [[function: | ||
| + | * [[function: | ||
| + | * [[function: | ||
| + | * [[: | ||
| + | |||
| + | === Tokens === | ||
| + | |||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | * [[token: | ||
| + | |||
| + | * [[: | ||
| + | |||
| + | === Triggers === | ||
| + | |||
| + | * [[trigger: | ||
| + | * [[: | ||
| + | |||
| + | ==== Forum ==== | ||
| + | |||
| + | - [[https:// | ||
| + | |||
| + | - [[https:// | ||
token/Window_Tokens.1562312734.txt.gz · Last modified: by peternlewis
