Divooka Reference

Desktop Automation

Preview

Control of the mouse, keyboard and open windows

Guide on the Methodox Wiki

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

Desktop Window

Display Info

Screen Point

Native Shell