Using the native getClipboard method in eclipse
I'm making use of the following class for accessing information that's on the clipboard because the sikuli method (env.getClipboard) only works once in a while. However, I also get the error that's shown below when I use the java class. Any assistance on how to overcome this will be much appreciated:
Using: Sikuli-r830
Class:
public static String getClipboard() {
Transferable t = Toolkit.
try {
if (t != null && t.isDataFlavorS
String text = (String) t.getTransferDa
return text;
}
} catch (Exception e) {
}
return "";
}
Error:
Exception in thread "main" java.lang.
at sun.awt.
at sun.awt.
at sun.awt.
The error only occurs if I try to run another iteration right after the first one is complete
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Boipelo Mawasha for more information if necessary.