Skip to content

Instantly share code, notes, and snippets.

@bherrmann7
Created June 23, 2010 03:39
Show Gist options
  • Save bherrmann7/449458 to your computer and use it in GitHub Desktop.
Save bherrmann7/449458 to your computer and use it in GitHub Desktop.
// Move text to the clipboard
def clfile = 'some interesting string'
java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(clfile);
java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().setContents(data, data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment