How to clear clipboard(setCliboard)?

Asked by TestMechanic

I would like to clear clipboard before my test. Since there is no setClipboard command I was thinking of paste() but while reading the threads I notice that paste() has problems.

Any Ideas how easily to clear the clipboard? (I use Windows)

Question information

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

On the Sikuli script level, this is currently not possible.

And as you noticed: getClipboard() and paste() do not play together.

If you are familiar with Java, you might incorporate some clipboard handling code into your Sikuli scripts, since you can use all Java classes in a Sikuli script.

Revision history for this message
TestMechanic (ndinev) said :
#2

I created simple(1 row in autoit :-) ) console application that does this and I use openApp to run it. Works perfectly for me.

Hope this helps