| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| token:Window_Tokens [2019/07/05 07:46] – old revision restored (2019/07/05 03:45) peternlewis | token:Window_Tokens [2020/09/01 00:03] (current) – Add FoundImage Token JMichaelTX |
|---|
| The parameter may be: | The parameter may be: |
| |
| * Front or 0: the focused/main window. Usually the same as index 1. | ^ Parameter ^ Meaning ^ |
| * Positive Number: the indexed window from front to back. | | Front or 0 | the focused/main window. Usually the same as index 1. | |
| * Negative Number: the indexed window from back to front. | | 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, //%WindowFrame%1%// gives the frame of the front window (the same as `%FrontWindowFrame%`). | So for example, //%WindowFrame%1%// gives the frame of the front window (the same as `%FrontWindowFrame%`). |
| ``` | ``` |
| |
| ==== Accessing Window and Screen Coordinates ==== | ==== Accessing Window, Screen, & Image Coordinates ==== |
| |
| When a Window or screen token returns a set of 4 comma-delimited values as one result into a Keyboard Maestro Variable (which is always text), you can access the individual values, and calculate other values, by using certain key words appended to the Variable name in a [[token:Calculate|Calculate Token]], such as the following: | When a Window, screen token or a [[token:FoundImage|FoundImage Token]] returns a set of 4 comma-delimited values as one result into a Keyboard Maestro Variable (which is always text), you can access the individual values, and calculate other values, by using certain _coordinate names_ appended to the Variable name in a [[token:Calculate|Calculate Token]], such as the following: |
| |
| {{:token:km-7.3-window-coordinates.png?nolink|}} | {{:token:km-7.3-window-coordinates.png?nolink|}} |
| For WindowPosition, you can use Left and Top, and for WindowSize you can use Width and Height. | For WindowPosition, you can use Left and Top, and for WindowSize you can use Width and Height. |
| |
| === Screen/Window Keyword "coordinates" === | === Screen/Window/Image Coordinate Names === |
| |
| |
| * [[token:WindowPosition|%WindowPosition%]] | * [[token:WindowPosition|%WindowPosition%]] |
| * [[token:WindowSize|%WindowSize%]] | * [[token:WindowSize|%WindowSize%]] |
| | * [[token:FoundImage|FoundImage Token]] |
| | |
| * [[:Tokens|See all Tokens]] | * [[:Tokens|See all Tokens]] |
| |