Block reference / Device Management
Get clipboard
Read what the phone's clipboard holds into a variable or the table.
Only in
WarpX 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.
{{variables.clipboard}}.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 as1000,3000for 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
- Start
- Start app
- Touch
- Touch
- Get clipboard
- Pick the phone in the toolbar's phone menu, and add a column
inviteCodeunder Table. - Add a Start app block for the app and open its invite page with Touch blocks.
- Add a Touch block on the app's Copy code button.
- Add a Get clipboard block. Keep Assign to variable with
clipboard, tick Insert to table and pickinviteCode. - 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 shelldoes, and keep what it prints.