Here is the function that i want to use in a web page and want to call it in script node as other javascript functions. But could you please guide me on how to achieve it.
public static String getClipboard() {
Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
try {
if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
String text = (String)t.getTransferData(DataFlavor.stringFlavor);
return text;
}
} catch (UnsupportedFlavorException e) {
} catch (IOException e) {
}
return null;
}
I am completely new to this concept.. If you can answer this question, that will be very helpful.. Thanks