Macro Automation
52 nodes
On this page 52
Activate Window
FunctionBrings 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.
ActivateWindow(title: Text) -> Truth
bool ActivateWindow(string title)
Parameters
| name | type | default | description |
|---|---|---|---|
| title | Text | — | Any part of the title as its title bar reads it: "notepad" finds "Untitled - Notepad". |
Returns
| Activated | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Click Mouse
FunctionPresses and releases a mouse button where the pointer already is.
ClickMouse(button: Mouse Button)
void ClickMouse(MacroAutomation.MouseButton button)
Parameters
| name | type | default | description |
|---|---|---|---|
| button | Mouse Button | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Click Mouse At
FunctionMoves the pointer somewhere and clicks there.
ClickMouseAt(x: Integer, y: Integer, button: Mouse Button)
void ClickMouseAt(
int x,
int y,
MacroAutomation.MouseButton button)Parameters
| name | type | default | description |
|---|---|---|---|
| x | Integer | — | |
| y | Integer | — | |
| button | Mouse Button | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Close Window
FunctionAsks a window to close, as its title bar button does. False where nothing happened; the application may still refuse.
CloseWindow(window: Desktop Window) -> Truth
bool CloseWindow(DesktopWindow window)
Parameters
| name | type | default | description |
|---|---|---|---|
| window | Desktop Window | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Command Process Windows
FunctionApplies one command to every window of a named process.
CommandProcessWindows -> Integer
processName: Text
command: Window Commandint CommandProcessWindows(
string processName,
WindowCommand command)Parameters
| name | type | default | description |
|---|---|---|---|
| processName | Text | — | |
| command | Window Command | — |
Returns
| result | Integer |
Remarks
The count rather than a bool, because "minimise that program" over four windows has three
interesting outcomes and not two: none of them, some of them, all of them.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Double Click Mouse
FunctionPresses and releases a button twice where the pointer already is.
DoubleClickMouse(button: Mouse Button)
void DoubleClickMouse(MacroAutomation.MouseButton button)
Parameters
| name | type | default | description |
|---|---|---|---|
| button | Mouse Button | — |
Remarks
Composed from the primitive rather than asked of the platform. Every platform recognises a
double click from two presses inside its own double-click interval, and two presses sent
back to back are always inside it, so a per-platform double click would be three
implementations of a two-line loop - two of them unrunnable here.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Drag
FunctionPresses a button at one point, glides to another, and releases.
Drag
fromX: Integer
fromY: Integer
toX: Integer
toY: Integer
button: Mouse Button
durationMilliseconds: Integervoid Drag(
int fromX,
int fromY,
int toX,
int toY,
MacroAutomation.MouseButton button,
int durationMilliseconds = 300)Parameters
| name | type | default | description |
|---|---|---|---|
| fromX | Integer | — | Where the drag starts. |
| fromY | Integer | — | Where the drag starts. |
| toX | Integer | — | Where it ends. |
| toY | Integer | — | Where it ends. |
| button | Mouse Button | — | Which button is held. |
| durationMilliseconds | Integer | 300 | Roughly how long the movement between the two takes. |
Remarks
The package had no drag at all, so its one real caller wrote one: set cursor, button down,
wait 50 ms, set cursor, button up. That works for a list item and fails for anything with a
drag threshold, because the pointer arrives at the destination in a single jump and the
application never sees it move while held.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Drag Along
FunctionPresses a button at the first point, glides through every remaining point in order, and releases at the last.
DragAlong
path: Screen Point Array
button: Mouse Button
durationMilliseconds: Integervoid DragAlong(
ScreenPoint[] path,
MacroAutomation.MouseButton button,
int durationMilliseconds = 300)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Screen Point Array | — | Two or more points. One point presses and releases without moving; none does nothing. |
| button | Mouse Button | — | Which button is held. |
| durationMilliseconds | Integer | 300 | Roughly how long the whole path takes, divided between its segments by length. |
Remarks
The multi-point form exists because the package's only real caller receives a path from a
language model's computer-use reply and used path[0] and path[1], silently
discarding the rest - so a gesture drawn round a corner was delivered as a straight line
through it.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Drag Along Paths
FunctionDraws a whole pen path: one drag per pen-down..pen-up mark, in order, with the pen lifted between them.
DragAlongPaths -> (Marks Drawn: Integer, cancelled: Truth)
marks: IReadOnlyList<Vector2 Array>
offsetX: Integer
offsetY: Integer
button: Mouse Button
millisecondsPerMark: Integer
millisecondsBetweenMarks: Integer
cancelKey: Keyint DragAlongPaths(
IReadOnlyList<Vector2[]> marks,
int offsetX,
int offsetY,
MacroAutomation.MouseButton button,
out bool cancelled,
int millisecondsPerMark = 400,
int millisecondsBetweenMarks = 60,
Key cancelKey = Key.None)Parameters
| name | type | default | description |
|---|---|---|---|
| marks | IReadOnlyList<Vector2 Array> | — | One mark per entry, each the ordered points of a single stroke, in the drawing's own coordinates with y downwards. This is the shape a traceable font's pen path arrives in; nothing here knows about fonts, and a plotter file or a hand-written list of points serves equally. |
| offsetX | Integer | — | Where the drawing's origin sits on the virtual desktop. |
| offsetY | Integer | — | Where the drawing's origin sits on the virtual desktop. |
| button | Mouse Button | — | Which button is held while a mark is drawn. |
| millisecondsPerMark | Integer | 400 | Roughly how long one mark takes, divided between its segments by length. |
| millisecondsBetweenMarks | Integer | 60 | How long the pen rests, lifted, between one mark and the next. |
| cancelKey | Key | None | A key that stops the run. Read between every two steps of the pointer and through every rest, so a tap is noticed whenever it comes; the mark in progress is released where the pointer is, which leaves a shorter stroke and never a line trailing off somewhere else. Key.None means nothing stops it. |
Returns
| Marks Drawn | Integer |
| cancelled | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Find Window
FunctionThe first window whose title contains this text, or DesktopWindow.None.
FindWindow(titleSubstring: Text) -> Desktop Window
DesktopWindow FindWindow(string titleSubstring)
Parameters
| name | type | default | description |
|---|---|---|---|
| titleSubstring | Text | — |
Returns
| result | Desktop Window |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Find Windows By Process
FunctionEvery window whose owning process has this name, ignoring case and an .exe suffix.
FindWindowsByProcess(processName: Text) -> Desktop Window Array
DesktopWindow[] FindWindowsByProcess(string processName)
Parameters
| name | type | default | description |
|---|---|---|---|
| processName | Text | — |
Returns
| result | Desktop Window Array |
Remarks
Above the seam, so "find the window of the program I mean" is written once rather than three
times - two of them on platforms that cannot be run here.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Find Windows By Title
FunctionEvery window whose title contains this text, ignoring case.
FindWindowsByTitle(titleSubstring: Text) -> Desktop Window Array
DesktopWindow[] FindWindowsByTitle(string titleSubstring)
Parameters
| name | type | default | description |
|---|---|---|---|
| titleSubstring | Text | — |
Returns
| result | Desktop Window Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Focus Process
FunctionBrings a named process's first window to the front.
FocusProcess(processName: Text) -> Truth
bool FocusProcess(string processName)
Parameters
| name | type | default | description |
|---|---|---|---|
| processName | Text | — |
Returns
| result | Truth |
Remarks
The first rather than all of them, because focusing several windows in turn leaves whichever
went last in front and is indistinguishable from focusing only that one.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Focus Window
FunctionBrings a window to the front and gives it the keyboard. False where nothing happened.
FocusWindow(window: Desktop Window) -> Truth
bool FocusWindow(DesktopWindow window)
Parameters
| name | type | default | description |
|---|---|---|---|
| window | Desktop Window | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Can Read Key State
FunctionWhether this machine can be asked what the keyboard is doing, as opposed to only told.
CanReadKeyState() -> Truth
bool CanReadKeyState()
Returns
| result | Truth |
Remarks
Separate from MacroAutomation.IsKeyDown because a caller whose stop condition is a key has to be
able to tell "not pressed" from "cannot see the keyboard": a macro that drives the pointer for
minutes and believes the second is the first is a macro nobody can stop. Windows and macOS can;
X11 can when a display opens; nothing else can.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Is Supported
FunctionFalse where nothing here can emulate input on this machine; every call is then a no-op.
IsSupported() -> Truth
bool IsSupported()
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Platform Name
FunctionA short name for a status line: "Windows", "X11", "Quartz", "none".
PlatformName() -> Text
string PlatformName()
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Support
FunctionHow far the backend in force is to be trusted. See DesktopInputEmulation.DesktopInputSupport.
Support() -> Desktop Input Support
DesktopInputSupport Support()
Returns
| result | Desktop Input Support |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Cursor
FunctionWhere the pointer is now.
GetCursor() -> Screen Point
ScreenPoint GetCursor()
Returns
| result | Screen Point |
Remarks
There was no way to ask this before. The Windows file declared GetCursorPos but left it
private and [Obsolete], so no caller could reach it - and the package's one real
caller has a commented-out SetCursor beside the note that the cursor should not be
moved, which is exactly the case a read-back serves: scroll where the pointer already is.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Display At
FunctionWhich monitor a coordinate is on, or the primary one where it is on none of them.
GetDisplayAt(x: Integer, y: Integer) -> Display Info
DisplayInfo GetDisplayAt(int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| x | Integer | — | |
| y | Integer | — |
Returns
| result | Display Info |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Displays
FunctionEvery monitor, with its place on the virtual desktop and its scale.
GetDisplays() -> Display Info Array
DisplayInfo[] GetDisplays()
Returns
| result | Display Info Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Foreground Window
FunctionThe window with focus, or DesktopWindow.None where nothing has it.
GetForegroundWindow() -> Desktop Window
DesktopWindow GetForegroundWindow()
Returns
| result | Desktop Window |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Own Process Name
FunctionThis process's own name, so a macro can recognise - and avoid acting on - the windows of the program running it.
GetOwnProcessName() -> Text
string GetOwnProcessName()
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Processes With Windows
FunctionThe distinct names of every process that owns a window, for a caller offering a list to choose from.
GetProcessesWithWindows() -> Text Array
string[] GetProcessesWithWindows()
Returns
| result | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Virtual Desktop Bounds
FunctionThe rectangle every coordinate in this class lives in: the union of every monitor.
GetVirtualDesktopBounds() -> Screen Rectangle
ScreenRectangle GetVirtualDesktopBounds()
Returns
| result | Screen Rectangle |
Remarks
Its origin can be negative. That is the whole reason this is a rectangle and not a size, and
the reason the old SM_CXSCREEN / SM_CYSCREEN normalisation could not reach a
second monitor.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Window Bounds
FunctionWhere the first window of a named process is, as four numbers, and whether it was found at all.
GetWindowBounds(processName: Text) -> (Found: Truth, x: Integer, y: Integer, width: Integer, height: Integer, maximized: Truth)
bool GetWindowBounds(
string processName,
out int x,
out int y,
out int width,
out int height,
out bool maximized)Parameters
| name | type | default | description |
|---|---|---|---|
| processName | Text | — | The owning process, ignoring case and an .exe suffix. |
Returns
| Found | Truth |
| x | Integer |
| y | Integer |
| width | Integer |
| height | Integer |
| maximized | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Windows
FunctionEvery top-level window that is on screen and has a title, front-most first where the platform has an order.
GetWindows() -> Desktop Window Array
DesktopWindow[] GetWindows()
Returns
| result | Desktop Window Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Get Window Under Cursor
FunctionThe front-most window whose bounds contain the pointer, or DesktopWindow.None.
GetWindowUnderCursor() -> Desktop Window
DesktopWindow GetWindowUnderCursor()
Returns
| result | Desktop Window |
Remarks
A bounds test over the enumeration, which each backend returns in front-to-back order, so the
first hit is the one a click would land on. It is a bounds test and not a hit test: a click
on a rounded corner or a transparent region of the front window would reach whatever is
behind it, and no platform reports that without asking the window itself.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Is Key Down
FunctionWhether a key is physically down right now, whoever has focus.
IsKeyDown(key: Key) -> Truth
bool IsKeyDown(Key key)
Parameters
| name | type | default | description |
|---|---|---|---|
| key | Key | — |
Returns
| result | Truth |
Remarks
The keyboard's MacroAutomation.GetCursor: this package could drive a keyboard and could not read
one, so a macro had no way to notice a person asking it to stop. It reads the device rather
than a window's message queue, which is what makes it answerable while the process running the
macro is minimised and has no focus - the state such a macro is normally in, since it has just
got out of the way of whatever it is driving.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Maximize Foreground Window
FunctionMaximises the window that currently has focus.
MaximizeForegroundWindow() -> Truth
bool MaximizeForegroundWindow()
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Maximize Process Windows
FunctionMaximises every window of a named process. Returns how many.
MaximizeProcessWindows(processName: Text) -> Integer
int MaximizeProcessWindows(string processName)
Parameters
| name | type | default | description |
|---|---|---|---|
| processName | Text | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Maximize Window
FunctionFills the window's monitor with it. False where nothing happened.
MaximizeWindow(window: Desktop Window) -> Truth
bool MaximizeWindow(DesktopWindow window)
Parameters
| name | type | default | description |
|---|---|---|---|
| window | Desktop Window | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Minimize Foreground Window
FunctionIconifies the window that currently has focus.
MinimizeForegroundWindow() -> Truth
bool MinimizeForegroundWindow()
Returns
| result | Truth |
Remarks
This is what HideEditor did, under a name that says so. The old name described a
caller's intent rather than the operation - it minimised whatever was in front, whether or not
that was an editor - and it was the package's entire window vocabulary.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Minimize Process Windows
FunctionIconifies every window of a named process. Returns how many.
MinimizeProcessWindows(processName: Text) -> Integer
int MinimizeProcessWindows(string processName)
Parameters
| name | type | default | description |
|---|---|---|---|
| processName | Text | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Minimize Window
FunctionIconifies a window. False where nothing happened.
MinimizeWindow(window: Desktop Window) -> Truth
bool MinimizeWindow(DesktopWindow window)
Parameters
| name | type | default | description |
|---|---|---|---|
| window | Desktop Window | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Move Cursor
FunctionMoves the pointer by a delta from wherever it is.
MoveCursor(dx: Integer, dy: Integer)
void MoveCursor(int dx, int dy)
Parameters
| name | type | default | description |
|---|---|---|---|
| dx | Integer | — | |
| dy | Integer | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Move Cursor Smoothly
FunctionMoves the pointer to an absolute coordinate over time, accelerating and decelerating.
MoveCursorSmoothly
x: Integer
y: Integer
durationMilliseconds: Integervoid MoveCursorSmoothly(
int x,
int y,
int durationMilliseconds = 250)Parameters
| name | type | default | description |
|---|---|---|---|
| x | Integer | — | Destination x, in virtual-desktop coordinates. |
| y | Integer | — | Destination y. |
| durationMilliseconds | Integer | 250 | Roughly how long the movement should take. |
Remarks
A pointer that teleports is the single most reliable signature of emulated input: some
applications ignore a click whose press arrives in the same input batch as the move that got
there, and hover states, drag thresholds and tooltips never fire at all. The easing is a
smoothstep, so the motion starts and ends slowly, which is also what makes the intermediate
positions land on the widgets a real hand would have crossed.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Press Key
FunctionPresses and releases a key, optionally holding modifiers while it is pressed.
PressKey(key: Key, modifiers: Key Modifiers)
void PressKey(
Key key,
KeyModifiers modifiers = KeyModifiers.None)Parameters
| name | type | default | description |
|---|---|---|---|
| key | Key | — | The key to press. |
| modifiers | Key Modifiers | None | Keys held down for the duration of the press. None by default. |
Remarks
Modifiers are pressed in a fixed order and released in the reverse of it, so a chord leaves
the keyboard exactly as it found it. Releasing in the same order as pressing is how an
emulated chord leaves a modifier stuck down - the failure the package README already
records as a "weird sticky key issue".
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Press Key Combination
FunctionPresses a chord given as keys: every key but the last is held, the last is pressed, and the held ones are released in reverse.
PressKeyCombination(keys: Key Array)
void PressKeyCombination(Key[] keys)
Parameters
| name | type | default | description |
|---|---|---|---|
| keys | Key Array | — |
Remarks
This is the shape a language model's computer-use reply arrives in - ["ctrl", "c"] -
and the shape the package could not express. The one real caller looped over the array
calling the old PressKey once per name, which pressed and released Control on its own
and then typed a lower-case "c".
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Restore Process Windows
FunctionBrings back every minimised window of a named process, each as it was before it was minimised, and leaves its other windows as they are. Returns how many came back.
RestoreProcessWindows(processName: Text) -> Integer
int RestoreProcessWindows(string processName)
Parameters
| name | type | default | description |
|---|---|---|---|
| processName | Text | — |
Returns
| result | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Restore Window
FunctionPuts a minimised or maximised window back to its previous size. False where nothing happened.
RestoreWindow(window: Desktop Window) -> Truth
bool RestoreWindow(DesktopWindow window)
Parameters
| name | type | default | description |
|---|---|---|---|
| window | Desktop Window | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Scroll Absolute
FunctionScrolls vertically. Positive scrolls down, as one detent of a wheel.
ScrollAbsolute(scrollY: Integer)
void ScrollAbsolute(int scrollY)
Parameters
| name | type | default | description |
|---|---|---|---|
| scrollY | Integer | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Scroll Horizontal
FunctionScrolls horizontally. Positive scrolls right.
ScrollHorizontal(scrollX: Integer)
void ScrollHorizontal(int scrollX)
Parameters
| name | type | default | description |
|---|---|---|---|
| scrollX | Integer | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Send Text
FunctionTypes text into whatever has focus, as characters rather than key positions.
SendText(text: Text, settleMilliseconds: Integer)
void SendText(string text, int settleMilliseconds = 0)
Parameters
| name | type | default | description |
|---|---|---|---|
| text | Text | — | The text to type. |
| settleMilliseconds | Integer | 0 | How long to wait afterwards. Zero by default. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Set Cursor
FunctionPuts the pointer at an absolute virtual-desktop coordinate, immediately.
SetCursor(x: Integer, y: Integer)
void SetCursor(int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| x | Integer | — | |
| y | Integer | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Set Key State
FunctionHolds a key down, or lets it up, without the other half.
SetKeyState(key: Key, pressed: Truth)
void SetKeyState(Key key, bool pressed)
Parameters
| name | type | default | description |
|---|---|---|---|
| key | Key | — | |
| pressed | Truth | — |
Remarks
A caller that takes a key down is responsible for putting it back up. Everything composed in
this class pairs its own presses, which is why nothing here can leave a modifier stuck.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Set Mouse State
FunctionPresses or releases a mouse button without releasing it again.
SetMouseState(button: Mouse Button, pressed: Truth)
void SetMouseState(
MacroAutomation.MouseButton button,
bool pressed)Parameters
| name | type | default | description |
|---|---|---|---|
| button | Mouse Button | — | |
| pressed | Truth | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Try Enable Per Monitor Dpi Awareness
FunctionAsks Windows to treat this process as per-monitor DPI aware, so the coordinates here are real pixels.
TryEnablePerMonitorDpiAwareness() -> Truth
bool TryEnablePerMonitorDpiAwareness()
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Try Press Key Named
FunctionPresses a key named as text, including a chord written as one string: "Enter", "esc", "ctrl+c".
TryPressKeyNamed(keyName: Text) -> Truth
bool TryPressKeyNamed(string keyName)
Parameters
| name | type | default | description |
|---|---|---|---|
| keyName | Text | — |
Returns
| result | Truth |
Remarks
The string-taking entry point survives, because the caller that needs one receives key names
from a language model and cannot be given an enum. What has gone is the guessing: the old
method parsed, caught whatever the parse threw, prepended VK_ and parsed again, so an
unrecognised name surfaced as an ArgumentException about a key the caller never wrote.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Try Press Keys Named
FunctionPresses a chord named as separate strings, as ["ctrl", "shift", "n"].
TryPressKeysNamed(keyNames: Text Array) -> Truth
bool TryPressKeysNamed(string[] keyNames)
Parameters
| name | type | default | description |
|---|---|---|---|
| keyNames | Text Array | — |
Returns
| result | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Wait
FunctionWaits, in milliseconds.
Wait(milliseconds: Integer)
void Wait(int milliseconds)
Parameters
| name | type | default | description |
|---|---|---|---|
| milliseconds | Integer | — |
Remarks
Through the backend rather than straight to Thread.Sleep, so a test that has installed
a DesktopInputEmulation.RecordingDesktopInput can assert what a macro asked to wait for without
spending it. Its default implementation is Thread.Sleep.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation
Wait Unless Key Down
FunctionWaits, unless a key goes down first - in which case it stops waiting there and says so.
WaitUnlessKeyDown(milliseconds: Integer, key: Key) -> Truth
bool WaitUnlessKeyDown(int milliseconds, Key key)
Parameters
| name | type | default | description |
|---|---|---|---|
| milliseconds | Integer | — | The longest it waits. |
| key | Key | — | The key that cuts the wait short, read from the device as MacroAutomation.IsKeyDown reads it. |
Returns
| Key Down | Truth |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Macro Automation
- Package
- Desktop Automation