Pick a screen point or rectangle
Asks for a point or a rectangle in screen coordinates and stores it as text.
Pick a screen mode
Keyboard Maestro: Prompt for screen Rect, Prompt for screen Point
Details #
Lets you point at the screen and stores what you picked as text. In the Switchboard Engine the screen dims and the pointer becomes a crosshair: with rect you drag a box (Space-drag moves it, a click picks the window under the pointer), with point you click. ⎋ cancels. Where no crosshair can be shown (the command line), a small question window with a text field asks for the numbers instead, starting at the pointer's position.
mode
point:x,yin screen points.mode
rect:left,top,right,bottomin screen points. In the question window it starts with the pointer as the top-left corner and a 200 by 150 rectangle.
To get the box as a record (x, y, w, h, and whether ⌥ or ⇧ was held), use a Ask for input of kind pickRegion instead.
Numbers can be separated by commas, spaces or both. The answer is stored as clean comma-separated text such as 120,340 and is also the step's output. Anything else fails.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
into | text | The variable that receives the text. | ||
mode | one of | point rect | point or rect. Default point. Any other value is treated as rect. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Pick a screen point
- Show “Point: {{ where }}” for 2 s
Gotchas #
Cancelling (⎋ or the question's Cancel) fails the step with "cancelled by you".
A wrong count of numbers fails with "... isn't x,y" or "... isn't left,top,right,bottom".
A dry run simulates the step: no question is asked and
intois set to empty. Turn on Safe in a dry run (dryRunSafe) to have it store the starting value instead (the pointer position, or the default rectangle), still without asking.Coordinates are screen points, not pixels, so they match Click on Retina screens.