Get text from clipboard Version 5 (Java)

Action group: "Base actions", subgroup: "Clipboard" 


Description

The action saves a text from a clipboard to a variable of a "String" type.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
TimeoutTimeout in milliseconds if clipboard is opened in another process. Default value is 30 seconds
Numeric20000No
Results
Result

A variable of type "String" into which the text from the clipboard will be saved

String



Special conditions of use

None.

Example of use

Task

From the text file read the text, copy to clipboard, get the text from the clipboard and display it in the dialogue window.

Solution

Use the "Read text file", "Copy text into clipboard", "Get text from clipboard", and "Show message" actions.

Implementation

Preface

To solve the problem the text document with data is used. 

  1. Move the "Read text file" action to the workspace.


  2. Set the "Read text file" action parameters.


  3. Move the "Copy text into clipboard" action to the workspace. 


  4. Set the "Copy text into clipboard" action parameters.
    In the "Text" field add the "Read text file" action result. 


  5. Move the "Get text from clipboard" action to the workspace.


  6. Set the "Get text from clipboard" action parameter.


  7. Move the "Show message" to the workspace.


  8. Set the "Show message" action parameter.
    In the "Show message" field add the "Get text from clipboard" action result.


  9. Run robot by clicking "Start" in the top panel.

Result

The program robot completed successfully. The text was obtained from the clipboard and displayed in the dialogue window.

  • Нет меток