Copying text to clipboard in linux using sikuli

Asked by jason

Is there anyway to copy texts to clipboard in Linux using sikuli? Since type("c", KeyModifier.CTRL) is the way to copy text. However the application that I had in Linux won't allow CTRL+C for copying. In order to copy I will have to press the middle button on a mouse, which I would assume something like mouseDown(Button.MIDDLE) and mouseUp(Button.MIDDLE). Is there anyways to get it copy into clipboard without CTRL+C.

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

if mouse-middle in your application is the equivalent to ctrl-c, then just simulate a mouse middle click (as you said) and then use Env.getClipBoard() to get the clipboard content.

Can you help with this problem?

Provide an answer of your own, or ask jason for more information if necessary.

To post a message you must log in.