clipboard

How to add/get image data in the OS clipboard using Python?

僤鯓⒐⒋嵵緔 提交于 2019-12-07 17:26:31
问题 I have some Python code that edits image files and would like to know how to add image data to the Operating System clipboard and get it from there. When searching for a cross-platform solution to replace or get clipboard text in Python, there were many simple answers to do it (e.g. using the built-in Tkinter module with some code). However, these methods could only use plain text, not other clipboard data like images. My version of Python is 3.x on Windows but the answer needs to be cross

HTML5 Clipboard API status - CanIUse Shows partial support

狂风中的少年 提交于 2019-12-07 13:40:06
问题 CanIUse.com shows that all major browsers have at least partial Clipboard API support while FF has full support: https://caniuse.com/#feat=clipboard However, I cannot find any tutorials or simple examples of how to write to the clipboard using HTML5 (no flash). Does anyone know what exactly partial support means, is this feature usable? If it only worked in Chrome/FF that would be sufficient for my needs. 回答1: I recently did an intense research on the W3C Clipboard API (which is up to this

Clipboard Support in Silverlight 3

早过忘川 提交于 2019-12-07 13:38:31
问题 I'm looking at developing a Silverlight application that displays a lot of information in a DataGrid. I want to somehow give the users the ability to copy this into Excel via the clipboard. Is this even possible in Silverlight 3? 回答1: No, this feature isn't available in SL3. Please read (Links talk about version 2, but that hasn't changed ever since): Copy text to clipboard? Storing text in the clipboard using Silverlight 2 回答2: OK, I've figured out how to do it, but it's not exactly elegant.

Inserting uris into Gtk.Clipboard with vala

走远了吗. 提交于 2019-12-07 12:18:25
问题 I am currently trying to implement copy and paste for my application, the problem is that i can only plaintext or images to the clipboard according to the documentation of Gtk.Clipboard : https://valadoc.org/gtk+-3.0/Gtk.Clipboard.html set_text / set_image . But then there is also this method https://valadoc.org/gtk+-3.0/Gtk.Clipboard.set_with_data.html set_with_data , which i think i can use for adding a uri or an array of uris. But i can't figure out how and didn't find any good examples

Copy string - Python

帅比萌擦擦* 提交于 2019-12-07 11:55:11
问题 Ok guys I imagine this is easy but I can't seem to find how to copy a string. Simply COPY to the system like CTRL+C on a text. Basically I want to copy a string so I can for example, lets say, paste(ctrl+v). Sorry for such a trivial question, haha. 回答1: This depends a lot on the OS. On Linux, due to X's bizarre selection model, the easiest way is to use popen('xsel -pi') , and write the text to that pipe. For example: (I think) def select_xsel(text): import subprocess xsel_proc = subprocess

Copy to clipboard in C++? [duplicate]

牧云@^-^@ 提交于 2019-12-07 09:31:50
问题 This question already has answers here : How do you copy/paste from the clipboard in C++? (4 answers) Closed 6 years ago . I want to copy some string to clipboard in my C++ application. How can I do that? Also is it possible to copy the formatting as well? Thank You 回答1: You said you use Qt in one of your comments. Qt has the class QClipboard, which is what you want (bonus: this is cross-platform). You can put almost anything you want, data is managed via MIME types. That means you can use

Javascript clipboard manipulation after section has been copied from website

£可爱£侵袭症+ 提交于 2019-12-07 08:43:11
问题 When I copy a section of test from this website my clipboard gets extra text appended to the end of it saying "Read more: " then the url of the page I was reading (plus a unique looking string on the end) How have they done this? 回答1: I've made some reverse engineering and it looks like this script is responsible for clipboard manipulation: http://tcr.tynt.com/ti.js (use http://jsbeautifier.org/ to see uncompressed code) See the introduction movie on this website: http://www.tynt.com/

Jupyter Notebook: How to copy paste image into MS word?

北城以北 提交于 2019-12-07 08:07:37
问题 I tried to copy the image and paste them into MS word, but it didn't work. I'm not sure if this is my problem, or the word's problem? The images are at: https://cdn.rawgit.com/cqcn1991/Wind-Speed-Analysis/master/output_HTML/marham.html#5.3-Sectoral-Comaprison The paste result (in MS Word), it's done by CTRL+C, CTRL+V: I can only paste the text, not the image. I experiment it with Medium and another web app. Medium works exactly like MS Word, while another is able to paste. I think the

Java thread goes to sleep when not in focus on OSX

断了今生、忘了曾经 提交于 2019-12-07 07:28:58
问题 I'm writing a program that listens to the System Clipboard for changes. The listener runs on a separate thread and performs some action (say, write to file) when the contents of the Clipboard changes. I'm polling the clipboard using the ClipboardOwner interface, so that when my program loses ownership of the Clipboard (meaning another process has modified the clipboard) an event is fired in my program letting me read the changes. public class OwnershipClipboardListener extends Thread

Can I add a custom paste option to the windows text editing context menu?

孤者浪人 提交于 2019-12-07 06:51:26
I am looking for a way to add an option(s) to the right click context menu when editing text on a WinXP machine. I already do a lot of copy/pasting on it, so the clipboard is always changing, but there is one string I type repeatedly in almost every file I edit. I've already added some custom option to the context menu for .zip files to batch unzip them, but I'm not having any luck finding a way to add this. The machine is used for a single purpose and I try to keep it as stable as possible so I'm trying to stay away from any new third-party software that could bloat the system. I don't think