BotreamDocs Website Türkçe v0.1.1

Desktop commands

window · desktop · sendkeys · mouse · screenshot · ocr · image · clipboard

window Window

Manages application windows.

Actions (--action)

--action:open

Starts a program and binds its window to a variable.

ParameterValueDefaultDescription
--path requiredtextProgram, e.g. notepad.exe or C:\Apps\erp.exe A file on the agent machine.
--argumentstext
--titletextTitle of the window to wait for (wildcards); for launchers that open another program
--timeoutnumber30Timeout in seconds
--output requiredvariable nameVariable for this window; desktop commands target it with --window:$name$
--action:attach

Binds an already open window to a variable.

ParameterValueDefaultDescription
--titletextWindow title (wildcards: *Invoice*)
--pathtextProgram (wildcards), e.g. erp.exe A file on the agent machine.
--timeoutnumber30Timeout in seconds
--output requiredvariable nameVariable for this window; desktop commands target it with --window:$name$
--action:activate
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--action:close
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--action:maximize
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--action:minimize
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--action:restore
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--action:resize
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--width requirednumber
--height requirednumber
--action:move
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--x requirednumber
--y requirednumber
--action:exists
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--output requiredvariable nameVariable that receives the result
--action:wait
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--timeoutnumber30Timeout in seconds
--action:getproperty
ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--property requiredtextWindow property
--output requiredvariable nameVariable that receives the result
--action:list
ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result

Examples

window --action:activate --window:$notepadWin$
window --action:wait --window:$notepadWin$ --timeout:30
window --action:exists --window:$notepadWin$ --output:isOpen
window --action:close --window:$notepadWin$
window --action:maximize --window:$notepadWin$
window --action:minimize --window:$notepadWin$
window --action:restore --window:$notepadWin$
window --action:resize --window:$notepadWin$ --width:800 --height:600
window --action:move --window:$notepadWin$ --x:100 --y:100
window --action:list --output:allWindows

window --action:open --path:"notepad.exe" --output:editor
window --action:attach --title:"*Invoice*" --path:"erp.exe" --output:erp
desktop --action:settext --window:$editor$ --by:classname --target:"Edit" --value:"Hello"

desktop Desktop

Interacts with desktop UI elements via Windows UI Automation.

Parameters of every variant

ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--by requiredone of automationid, name, classname, xpath, index
--target requiredtextIdentifier value
--propertiestextObject properties of the captured element. Every checked property must match; the selector is built from them
--anchortextA nearby element that does not change, e.g. name=Amount, automationid=lblTotal, classname=Static or an XPath; among several matches of --target the one closest to it is used
--anchorpositionone of near, right, left, below, abovenearWhere the element is, seen from the anchor: the closest match on that side is used
--fallbacktextOther selectors to try when the first finds nothing, separated by " || ". Alternatives from the properties table are tried after them by themselves
--timeoutnumber30Timeout in seconds
--retrynumberNumber of retry attempts. When not set, screen and file commands try once more after a passing problem (a page still loading, a covered element, a locked file); 0 turns that off
--retryintervalnumber1Seconds between retries

Actions (--action)

--action:click

No further parameters.

--action:doubleclick

No further parameters.

--action:rightclick

No further parameters.

--action:clear

No further parameters.

--action:check

No further parameters.

--action:uncheck

No further parameters.

--action:hover

No further parameters.

--action:focus

No further parameters.

--action:expandcollapse

No further parameters.

--action:scrollto

No further parameters.

--action:waitfor

No further parameters.

--action:settext

Replaces the text of a field (formerly: type).

ParameterValueDefaultDescription
--value requiredtext
--action:appendtext

Adds text after what a field already holds.

ParameterValueDefaultDescription
--value requiredtext
--action:select
ParameterValueDefaultDescription
--value requiredtext
--action:getproperty

Reads a property, a state (enabled, checked, visible), the selected item or the position of the element.

ParameterValueDefaultDescription
--property requiredtextElement property
--output requiredvariable nameVariable that receives the result
--action:setproperty
ParameterValueDefaultDescription
--property requiredtextOnly value can be set
--value requiredtext
--action:exists
ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:getchildren
ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result

Examples

desktop --action:click --window:$notepadWin$ --by:automationid --target:"btnSave"
desktop --action:settext --window:$notepadWin$ --by:name --target:"Text Editor" --value:"Hello World"
desktop --action:getproperty --window:$notepadWin$ --by:automationid --target:"statusBar" --property:value --output:statusText
desktop --action:exists --window:$notepadWin$ --by:name --target:"Save" --output:saveExists

sendkeys Send keys

Types text and special keys into a window. Special keys go in brackets: [ENTER], [TAB], [CTRL+C].

Parameters

ParameterValueDefaultDescription
--window required$variable$Window from window --action:open/attach, or a set --type:window pattern
--keys requiredkeysText to type; special keys in brackets, e.g. Hello[ENTER] or [CTRL+A]. Use [[ for a literal [
--intervalnumber0Delay between keystrokes in milliseconds
--activatetrue / falsetrueBring the window to the front first

mouse Mouse

Clicks, moves, drags and scrolls the mouse at pixel positions: for programs whose elements cannot be captured (remote desktops, drawings). Prefer Capture where it works; positions break when the layout changes.

Parameters of every variant

ParameterValueDefaultDescription
--window$variable$Positions are counted from the top-left corner of this window, which is brought to the front; from the screen corner when empty

Actions (--action)

--action:click
ParameterValueDefaultDescription
--xnumberPixels from the left; where the pointer is when empty. Pick: click the point on the screen
--ynumberPixels from the top
--action:doubleclick
ParameterValueDefaultDescription
--xnumberPixels from the left; where the pointer is when empty. Pick: click the point on the screen
--ynumberPixels from the top
--action:rightclick
ParameterValueDefaultDescription
--xnumberPixels from the left; where the pointer is when empty. Pick: click the point on the screen
--ynumberPixels from the top
--action:middleclick
ParameterValueDefaultDescription
--xnumberPixels from the left; where the pointer is when empty. Pick: click the point on the screen
--ynumberPixels from the top
--action:move
ParameterValueDefaultDescription
--x requirednumberPixels from the left. Pick: click the point on the screen
--y requirednumberPixels from the top
--action:drag

Presses the left button at x,y, moves to tox,toy and releases.

ParameterValueDefaultDescription
--x requirednumberWhere to press. Pick: click the point on the screen
--y requirednumber
--tox requirednumberWhere to release. Pick: click the point on the screen
--toy requirednumber
--action:scroll
ParameterValueDefaultDescription
--amount requirednumberWheel steps: positive scrolls up, negative down
--xnumberScroll over this position; where the pointer is when empty. Pick: click the point on the screen
--ynumber
--action:getposition

Where the pointer is, as a record with X and Y.

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result

Examples

mouse --action:click --x:420 --y:310
mouse --action:doubleclick --window:$erp$ --x:120 --y:80
mouse --action:rightclick
mouse --action:drag --window:$erp$ --x:100 --y:200 --tox:400 --toy:200
mouse --action:scroll --amount:-3
mouse --action:move --x:10 --y:10
mouse --action:getposition --output:pos

screenshot Screenshot

Saves a picture of the screen, of a window or of an area of either, e.g. as evidence when something goes wrong.

Parameters

ParameterValueDefaultDescription
--file requiredtextPicture to write: .png, .jpg or .bmp A file on the agent machine.
--window$variable$Window to take (brought to the front first); the whole screen when empty. Mark area: drag a rectangle on the screen
--xnumber0Area: left edge, relative to the window (or the screen)
--ynumber0Area: top edge, relative to the window (or the screen)
--widthnumberArea: width in pixels (the whole window when empty)
--heightnumberArea: height in pixels (the whole window when empty)
--outputvariable nameVariable that receives the path of the saved file

Examples

screenshot --file:"C:\Shots\error-$orderNo$.png"
screenshot --file:"C:\Shots\erp.jpg" --window:$erp$ --x:0 --y:40 --width:800 --height:500 --output:saved

ocr OCR

Reads text from the screen or a picture with Windows' built-in OCR: for applications and scans where elements cannot be captured (terminals, Citrix, images).

Parameters of every variant

ParameterValueDefaultDescription
--window$variable$Window to read; the whole screen when empty (not with --file). Mark area: drag a rectangle on the screen
--xnumber0Area: left edge, relative to the window (or the screen)
--ynumber0Area: top edge, relative to the window (or the screen)
--widthnumberArea: width in pixels (the whole window when empty)
--heightnumberArea: height in pixels (the whole window when empty)
--filetextRead a picture file (.png, .jpg, .bmp, .tif) instead of the screen A file on the agent machine.
--languagetextOCR language installed in Windows, e.g. tr, en, de; the Windows display languages when empty

Actions (--action)

--action:read

All the text, lines separated by line breaks.

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:readlines

Each line with its position: Text, X, Y, Width, Height, CenterX, CenterY.

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:find

Where a text is: a record with Found and the position (click it with mouse --x:$pos.CenterX$ --y:$pos.CenterY$).

ParameterValueDefaultDescription
--text requiredtextText to look for (part of a line, case does not matter)
--output requiredvariable nameVariable that receives the result
--action:languages

The OCR languages installed on the agent machine.

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result

Examples

ocr --action:read --window:$terminal$ --x:0 --y:60 --width:900 --height:400 --language:tr --output:screenText
ocr --action:readlines --window:$erp$ --output:lines
ocr --action:find --window:$erp$ --text:"Toplam" --output:pos
mouse --action:click --window:$erp$ --x:$pos.CenterX$ --y:$pos.CenterY$
ocr --action:read --file:"C:\Scans\invoice.png" --output:scanText
ocr --action:languages --output:installed

image Image

Finds a picture on the screen (a button, an icon, a logo) and clicks it or tells where it is: for screens whose elements cannot be captured (Citrix and remote desktops, canvas apps, games).

Parameters of every variant

ParameterValueDefaultDescription
--image requiredtextThe picture to look for: mark it on the screen (Capture picture), or a .png/.jpg/.bmp file on the agent machine
--window$variable$Look only in this window (brought to the front first); the whole screen when empty
--similaritynumber90How similar a spot must be, in percent (50–100). Lower finds pictures that changed a little (colours, smoothing); higher avoids look-alikes
--timeoutnumberSeconds to wait for the picture (default 10; exists: 0, does not wait)

Actions (--action)

--action:find

Where the picture is: a record with Found, X, Y, Width, Height, CenterX, CenterY and Similarity (Found false when it did not appear in time).

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:exists

true when the picture is on the screen.

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:click
ParameterValueDefaultDescription
--offsetxnumber0Pixels right of the picture’s centre (negative: left)
--offsetynumber0Pixels below the picture’s centre (negative: above)
--action:doubleclick
ParameterValueDefaultDescription
--offsetxnumber0Pixels right of the picture’s centre (negative: left)
--offsetynumber0Pixels below the picture’s centre (negative: above)
--action:rightclick
ParameterValueDefaultDescription
--offsetxnumber0Pixels right of the picture’s centre (negative: left)
--offsetynumber0Pixels below the picture’s centre (negative: above)
--action:hover
ParameterValueDefaultDescription
--offsetxnumber0Pixels right of the picture’s centre (negative: left)
--offsetynumber0Pixels below the picture’s centre (negative: above)
--action:waitvanish

Waits until the picture is gone from the screen (a spinner, a "Please wait" banner); fails after --timeout.

No further parameters.

Examples

image --action:click --image:4f1d2c3b-aaaa-4bbb-8ccc-123456789abc --window:$citrix$ --offsetx:-10
image --action:find --image:"C:\Pictures\approve.png" --similarity:85 --timeout:20 --output:pos
image --action:waitvanish --image:<id> --timeout:60

clipboard Clipboard

Reads and writes the text on the Windows clipboard, e.g. after sendkeys [CTRL+C].

Actions (--action)

--action:settext
ParameterValueDefaultDescription
--text requiredany value
--action:gettext

The text on the clipboard (empty when it holds none).

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:clear

No further parameters.

Examples

clipboard --action:settext --text:$orderNo$
clipboard --action:gettext --output:copied
clipboard --action:clear
Botream 0.1.1 · Generated 2026-10-14