On Wednesday, September 21, 2016 at 8:25:52 AM UTC-5, Phil wrote:
>
> I have a script that generates some text in the log pane, which I then 
> manually copy and paste into another application. Can I save myself the 
> manual copy step by having the script put the text directly into the 
> clipboard?
>

Yes, though it's not documented.  See leoPy.leo, the node:
Code-->Qt gui-->@file ../plugins/qt_gui.py-->class 
LeoQtGui(leoGui.LeoGui)-->LeoQtGui.Clipboard

For example (tested):

g.app.gui.replaceClipboardWith('hi')
print(g.app.gui.getTextFromClipboard())

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to