Scroll
Scrolls with the mouse wheel by a number of pixels, optionally at a position.
Scroll by dx, dy
Keyboard Maestro: ScrollWheelEvent
Details #
Sends a scroll wheel event to whatever is under the pointer. dy scrolls vertically: a positive number scrolls down and a negative one up. dx scrolls sideways: positive goes right, negative left. Amounts are in pixels. At least one of them must be non-zero.
Set at to move the pointer to that screen position first. Without it, the scroll happens where the pointer already is.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
at | record | x y | A screen position { "x": 400, "y": 300 } to move the pointer to before scrolling. | |
dx | number | Pixels to scroll sideways. Positive is right. | ||
dy | number | Pixels to scroll vertically. Positive is down. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Scroll up 600
- Scroll down 300 at (500, 400)
Gotchas #
Scrolling happens once, in one event. Large amounts may move less than you expect in apps with their own scroll smoothing. Repeat the step in a loop for long scrolls.
With neither
dxnordy, or both 0, the step fails.Switchboard needs the Accessibility permission.