put RTF formated data into clipboard
Hi all!
I need put the RTF formated string and "text/rtf" DataFlavor into clipboard . Here is code what I started:
from java.awt import Toolkit
from java.awt.
from java.io import *
def ClipboardPutRtf
cb_data = StringSelection
cb = Toolkit.
RTF_FLAVOR = DataFlavor(
p = (cb_data, RTF_FLAVOR)
cb.
if __name__ == '__main__' :
RTF_STRING = u"{\\rtf1\
ClipboardPu
But now I'm sticked with how prepare transferable p object in Jython to pass it to setContents method, because my example gets error:
[error] TypeError ( setContents(): 1st arg can't be coerced to java.awt.
[error] --- Traceback --- error source first line: module ( function ) statement ##: main ( ClipboardPutRtf
[error] --- Traceback --- end --------------
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Vyacheslav Kolesnik
- Solved:
- Last query:
- Last reply: