Desktop Automation
PreviewControl of the mouse, keyboard and open windows
116 nodes in 6 categories
- Ships with
- Divooka ExploreDivooka Compute
- Support tier
- Tier 2 (proposed)
- Package
- Desktop Automation
Desktop Automation
Control the mouse and keyboard, interact with open windows, and work with files and running processes. Use these tools to automate tasks in other desktop applications.
Macro Automation
Activate WindowBrings the window whose title contains this text, ignoring case, to the front and gives it the keyboard - how a macro switches to another program before sending it keys.Click MousePresses and releases a mouse button where the pointer already is.Click Mouse AtMoves the pointer somewhere and clicks there.Close WindowAsks a window to close, as its title bar button does.Command Process WindowsApplies one command to every window of a named process.Double Click MousePresses and releases a button twice where the pointer already is.DragPresses a button at one point, glides to another, and releases.Drag AlongPresses a button at the first point, glides through every remaining point in order, and releases at the last.Drag Along PathsDraws a whole pen path: one drag per pen-down..pen-up mark, in order, with the pen lifted between them.Find WindowThe first window whose title contains this text, or DesktopWindow.None.Find Windows By ProcessEvery window whose owning process has this name, ignoring case and an .exe suffix.Find Windows By TitleEvery window whose title contains this text, ignoring case.Focus ProcessBrings a named process's first window to the front.Focus WindowBrings a window to the front and gives it the keyboard.Can Read Key StateWhether this machine can be asked what the keyboard is doing, as opposed to only told.Is SupportedFalse where nothing here can emulate input on this machine; every call is then a no-op.Platform NameA short name for a status line: "Windows", "X11", "Quartz", "none".SupportHow far the backend in force is to be trusted.Get CursorWhere the pointer is now.Get Display AtWhich monitor a coordinate is on, or the primary one where it is on none of them.Get DisplaysEvery monitor, with its place on the virtual desktop and its scale.Get Foreground WindowThe window with focus, or DesktopWindow.None where nothing has it.Get Own Process NameThis process's own name, so a macro can recognise - and avoid acting on - the windows of the program running it.Get Processes With WindowsThe distinct names of every process that owns a window, for a caller offering a list to choose from.Get Virtual Desktop BoundsThe rectangle every coordinate in this class lives in: the union of every monitor.Get Window BoundsWhere the first window of a named process is, as four numbers, and whether it was found at all.Get WindowsEvery top-level window that is on screen and has a title, front-most first where the platform has an order.Get Window Under CursorThe front-most window whose bounds contain the pointer, or DesktopWindow.None.Is Key DownWhether a key is physically down right now, whoever has focus.Maximize Foreground WindowMaximises the window that currently has focus.Maximize Process WindowsMaximises every window of a named process.Maximize WindowFills the window's monitor with it.Minimize Foreground WindowIconifies the window that currently has focus.Minimize Process WindowsIconifies every window of a named process.Minimize WindowIconifies a window.Move CursorMoves the pointer by a delta from wherever it is.Move Cursor SmoothlyMoves the pointer to an absolute coordinate over time, accelerating and decelerating.Press KeyPresses and releases a key, optionally holding modifiers while it is pressed.Press Key CombinationPresses a chord given as keys: every key but the last is held, the last is pressed, and the held ones are released in reverse.Restore Process WindowsBrings back every minimised window of a named process, each as it was before it was minimised, and leaves its other windows as they are.Restore WindowPuts a minimised or maximised window back to its previous size.Scroll AbsoluteScrolls vertically.Scroll HorizontalScrolls horizontally.Send TextTypes text into whatever has focus, as characters rather than key positions.Set CursorPuts the pointer at an absolute virtual-desktop coordinate, immediately.Set Key StateHolds a key down, or lets it up, without the other half.Set Mouse StatePresses or releases a mouse button without releasing it again.Try Enable Per Monitor Dpi AwarenessAsks Windows to treat this process as per-monitor DPI aware, so the coordinates here are real pixels.Try Press Key NamedPresses a key named as text, including a chord written as one string: "Enter", "esc", "ctrl+c".Try Press Keys NamedPresses a chord named as separate strings, as ["ctrl", "shift", "n"].WaitWaits, in milliseconds.Wait Unless Key DownWaits, unless a key goes down first - in which case it stops waiting there and says so.
Screen Rectangle
Make Screen RectangleA rectangle on the virtual desktop.ContainsHalf-open containment: the right and bottom edges are outside.DeconstructEqualsBottomOne past the bottommost pixel.CentreThe pixel in the middle, which is where a window command aims a click.Get HeightIs EmptyTrue where this rectangle encloses no pixels at all.RightOne past the rightmost pixel.Get WidthGet XGet YGet Hash CodeSet HeightSet WidthSet XSet YTo StringReads as a rectangle rather than as a record's field list.UnionThe smallest rectangle holding both.EmptyNothing: what a backend that cannot answer the question reports.Op EqualityOp Inequality
Desktop Window
Make Desktop WindowA window somewhere on the desktop, and which process owns it.DeconstructEqualsBoundsWhere it sits, in virtual-desktop coordinates.Display StateMinimised, maximised or ordinary.ExistsFalse for DesktopWindow.None.HandleThe platform's identifier: an HWND on Windows, an X11 window id, a CGWindowID.Process IdThe owning process, or 0 where unknown.Process NameThe owning process's name without extension, or empty where unknown.TitleThe window's title bar text.Get Hash CodeTo StringReads as a window rather than as a record's field list, for a log line or a status bar.NoneNo window: what "nothing is in front" and "nothing matched" both report.Op EqualityOp Inequality
Display Info
Make Display InfoOne monitor: where it sits on the virtual desktop, and at what scale.DeconstructEqualsBoundsThe whole monitor, in virtual-desktop pixels.Dots Per InchThe monitor's effective DPI, 96 meaning unscaled.Is PrimaryThe one whose top-left corner is the origin.NameThe platform's name for the device, for a caller that wants to show a list.Scale Factor96 DPI is 1.0; a monitor at 150% reports 1.5.Working AreaWhat is left after the taskbar or dock.Get Hash CodeTo StringOp EqualityOp Inequality