Block reference / Device Management

Get clipboard

Read what the phone's clipboard holds into a variable or the table.

Only inWarpX Phone

Get clipboard reads the text on the phone's clipboard. Use it after a Copy button in an app: an invite code, a link to share, a wallet address. Android 10 and later let no ordinary app read the clipboard from the background, so WarpX Phone reads it the way screen mirroring does, as the phone's shell.

After Copy code, Get clipboard reads the copied text into {{variables.clipboard}}.
The Get clipboard block's settings, filled in as in the example below.

Settings

Assign to variable

Stores the clipboard's text in a workflow variable.

ExampleChecked
Variable namewhen Assign to variable is on

The variable to write. Later blocks read it as {{variables.clipboard}}; start the name with $push: to add to a list instead of replacing it.

Exampleclipboard
Insert to table

Writes the clipboard's text into a column of the workflow's table. Only offered once the table has columns (Table in the toolbar).

ExampleUnchecked
Select columnwhen Insert to table is on

The table column to write to.

ExampleinviteCode
Delay (ms)

A wait after the block finishes, before the next one starts. One number such as 1000, or a range such as 1000,3000 for a random wait in that range on each run.

Example0

Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.

What it hands on

The text goes to the variable, clipboard unless renamed, and to the chosen column if Insert to table is ticked. It is also handed on as {{prevBlockData}}. An empty clipboard reads as empty text, not an error.

Example: Collect an app's invite code into the table

  1. Start
  2. Start app
  3. Touch
  4. Touch
  5. Get clipboard
Where Get clipboard sits in the example workflow.
  1. Pick the phone in the toolbar's phone menu, and add a column inviteCode under Table.
  2. Add a Start app block for the app and open its invite page with Touch blocks.
  3. Add a Touch block on the app's Copy code button.
  4. Add a Get clipboard block. Keep Assign to variable with clipboard, tick Insert to table and pick inviteCode.
  5. Click Run, then open Table: the code is in a new row.

Good to know

  • Only text is read. The block waits about 3 seconds for the phone's answer, and reads empty if none came.
  • It needs the screen-mirroring server WarpX Phone ships with; a build without it fails with SCRCPY_UNAVAILABLE.

See also

  • Set clipboard — Put text on the phone's clipboard, ready for an app's Paste.
  • Touch — Tap, hold or double-tap an element on the phone's screen, or a point on it.
  • ADB command — Run a command in the phone's shell, as adb shell does, and keep what it prints.