I use the below commands to copy string "ABC" to clipboard.
[file: aa.tcl]
set myVar Hello
clipboard clear
clipboard append $myVar
clipboard get
Hello
It works well in the tool. But it doesn't work when I try to paste it into terminal sciprt.txt with mousewhell-click
How can I paste the variable in tcl into terminal-text file?
not working, xclip, bind, event etc ...
The
clipboardcommand works on the CLIPBOARD selection. This selection is usually taken when pasting the "Windows way": Using Ctrl-V or via the Paste option from the Edit menu or a context menu.When pasting with the middle mouse button, the PRIMARY selection is taken instead. You have to use the
selectioncommand to work with the PRIMARY selection. Unfortunately, this is a bit more cumbersome than theclipboardcommand.