Skip to content

Instantly share code, notes, and snippets.

@yoursdearboy
Created December 26, 2016 12:58
Show Gist options
  • Save yoursdearboy/021570871e9cc276c044b463233ac5b4 to your computer and use it in GitHub Desktop.
Save yoursdearboy/021570871e9cc276c044b463233ac5b4 to your computer and use it in GitHub Desktop.
OmegaT script to copy current entry to clipboard
import org.omegat.core.Core
import java.awt.Toolkit
import java.awt.datatransfer.StringSelection
import java.awt.datatransfer.Transferable
def clipboard = Toolkit.getDefaultToolkit().getSystemClipboard()
def text = Core.getEditor().getCurrentEntry().srcText
clipboard.setContents(new StringSelection(text), null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment