PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Core package guide

Open applications, click, type and read text in Windows apps. These simple selectors suit existing automations. For new UI work, use Capture: it finds controls better.

Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested. See Packages.

Jump to actions

Prerequisites

Shared fields

Click, Read text and Type use these fields to find the control.

InputEditor fieldType; default; editor ruleValue
windowwindowStringdefault emptyoptional.Part of the window title, for example Notepad⁠. Upper or lower case does not matter. If two windows match, the newest app wins; two windows of the same app can tie. The step waits up to 5 seconds for the window. A text field, not a Window variable.
automationIdautomationIdStringdefault emptyoptional.The control's exact ID, copied from an inspector tool. It wins over name⁠. Leave it empty for the Notepad text area.
namenameStringdefault emptyoptional.The control's exact name, used only when automationId is empty. If both are empty, the step uses the first text area in the window, or the window itself. Use this only in a simple editor like Notepad.

Actions

Click (click)

Click a control in a window. If the control cannot be clicked directly, the step moves the mouse to its center and clicks.

Inputs

Uses the shared fields: window, automationId, name.

Outputs

None.

Example

With Notepad open, set window=Notepad. Leave automationId and name empty.

Expected result

The Notepad text area gets the focus or a click.

Back to actions

Open application (openApp)

Start a program or open a file, like a double-click. The step does not wait for a window: add Wait for window after it.

Inputs

InputEditor fieldType; default; editor ruleValue
pathpathStringdefault emptyrequired.A program name, a program path or a file, for example notepad.exe⁠. Use a full path or a program name: a short path does not start in the automation folder.
argsargsStringdefault emptyoptional.The command-line arguments as one text. Empty: no arguments. Put quotes around paths with spaces.

Outputs

None.

Example

Set path=notepad.exe. Leave args empty.

Expected result

Notepad opens. The step does not wait for the window; add Wait for window after it. A program that does not exist fails. Close Notepad after the test.

Back to actions

Read text (readText)

Read the text of a control. If it has no text, you get its name.

Inputs

Uses the shared fields: window, automationId, name.

Outputs

OutputTypeValue
textStringThe control's text, or its name if it has no text. A field that can hold text but is empty gives empty text.

Example

Type Invoice sample into an empty Notepad. Set window=Notepad and leave automationId and name empty. Put output text in String $readBack$.

Expected result

$readBack$ contains Invoice sample, maybe with line endings. A read right after typing can get only the first part, until the app has processed all keys.

Back to actions

Send keys (sendKeys)

Old action, kept so saved steps still run. New steps cannot add it: use Keystrokes. It sends keys to the window that has the focus.

Inputs

InputEditor fieldType; default; editor ruleValue
keyskeysStringdefault emptyrequired.^ Ctrl, % Alt, + Shift, each for the next key only. {ENTER} presses Enter; other key names in braces work too. No key groups. Not the same as the Keystrokes [ ] format.

Outputs

None.

Example

In a saved Send keys step, click into an empty Notepad. Set keys=Invoice sample{ENTER}Ready. Do not use square brackets here.

Expected result

Notepad contains Invoice sample, a new line and Ready. An unknown key name or a missing } fails. The focus is not locked: if another app comes to the front, it gets the keys.

Back to actions

Type (type)

Type text into a control. Most fields are replaced. Some get the text at the cursor, so clear them first.

Inputs

InputEditor fieldType; default; editor ruleValue
texttextStringdefault emptyrequired.The text, typed as is. Brackets are not key names here. A writable field is replaced; otherwise the text goes in at the cursor or selection.

Also uses the shared fields: window, automationId, name.

Outputs

None.

Example

With an empty Notepad open, set window=Notepad and text=Invoice sample. Leave automationId and name empty.

Expected result

Notepad contains Invoice sample. Typing at the cursor does not clear a document that already has text.

Back to actions

Wait for window (waitWindow)

Wait until a window whose title contains the text appears. Use it after Open application.

Inputs

InputEditor fieldType; default; editor ruleValue
titletitleStringdefault emptyoptional.Part of the title, for example Notepad⁠. Upper or lower case does not matter. Empty can match any window with a title, so give a title.
timeoutMstimeoutMsNumberdefault 30000optional.Milliseconds to wait; default 30000⁠. Checks every 250 ms. 0 or less checks once.

Outputs

None. The step only waits; it does not change the app.

Example

Start Notepad. Set title=Notepad and timeoutMs=10000.

Expected result

The step ends when a matching window appears within 10 seconds. If none appears, it fails with window not found. It does not give a Window variable.

Back to actions