Created
December 26, 2016 12:58
-
-
Save yoursdearboy/021570871e9cc276c044b463233ac5b4 to your computer and use it in GitHub Desktop.
OmegaT script to copy current entry to clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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