clipboard

How to programmatically cut/copy/get files to/from the Windows clipboard in a system standard compliant form?

匆匆过客 提交于 2019-11-27 18:46:33
问题 How do I put a cut/copy reference to specific files and/or folders into the Windows clipboard so that when I open standard Windows Explorer window, go to somewhere and press Ctrl + V - the files are pasted? If I copy or cut some files/folders in Windows Explorer, how do I get this information (full names and whether they were cut or copied) in my program? I program in C# 4.0, but other languages' ways are also interesting to know. 回答1: I've got the 90% solution, reverse-engineered from the

How to programmatically copy asynchronous dependent content to the clipboard following a click?

浪子不回头ぞ 提交于 2019-11-27 17:51:33
问题 I'm trying to programmatically use the execCommand in Chrome (Build 43) to copy the result of an asynchronous JSONP request to the clipboard. Here is a snippet of the logic : loadContent() function loadContent(callback) { $.getJSON('http://www.randomtext.me/api/lorem/p-5/10-20?&callback=myFunc',function(result){ console.log('result=',result.text_out); $("#container").html(result.text_out); if (callback) { callback(); } }); } function copyAjax() { loadContent(copy); } function copy() { var

Disable clipboard prompt in Excel VBA on workbook close

*爱你&永不变心* 提交于 2019-11-27 17:44:09
问题 I have an Excel workbook, which using VBA code that opens another workbook, copies some data into the original, then closes the second workbook. When I close the second workbook (using Application.Close ), I get a prompt for: Do you want to save the clipboard. Is there a command in VBA which will bypass this prompt? 回答1: I can offer two options Direct copy Based on your description I'm guessing you are doing something like Set wb2 = Application.Workbooks.Open("YourFile.xls") wb2.Sheets(

javascript cut/copy/paste to clipboard: how did Google solve it?

给你一囗甜甜゛ 提交于 2019-11-27 17:38:01
Yes, this question has been asked again and again: how to copy and paste from and to the system clipboard with javascript? I have found only partial solutions and hacks so far. The reason that it has been asked so often in the past is that there still is no working solution. However, I saw that Google Docs actually has a working solution now for both keyboard events as well as buttons. So, it is possible, but how do they do it? Software Salad article, Accessing the System Clipboard with JavaScript – A Holy Grail? , gives a nice overview of the problem (but it's a few years old). In short: you

How can I copy the output of a command directly into my clipboard?

南楼画角 提交于 2019-11-27 16:33:17
How can I pipe the output of a command into my clipboard and paste it back when using a terminal? For instance: cat file | clipboard Legend I always wanted to do this and found a nice and easy way of doing it. I wrote down the complete procedure just in case anyone else needs it. First install a 16 kB program called xclip : sudo apt-get install xclip You can then pipe the output into xclip to be copied into the clipboard: cat file | xclip To paste the text you just copied, you shall use: xclip -o To simplify life, you can set up an alias in your .bashrc file as I did: alias "c=xclip" alias "v

build a chrome extension in order to upload images (from clipboard)

放肆的年华 提交于 2019-11-27 15:26:11
问题 I wanted to write a simple chrome extension in order to substitute the following sequence of steps which i have to do very often for university: make screenshot of something edit screenshot in Paint save unnamend.png to harddrive upload unnamed.png to imageshack.us/pic-upload.de or any other website share link of image with others. I don't care which image upload service to use, i just want automize this use-case in order to save time (I already red and did a getting-started chrome extension

Copy and paste clipboard in JavaScript. or jQuery

这一生的挚爱 提交于 2019-11-27 15:19:29
How do I copy content thats present in a div tag and paste it to applications like Paint, Powerpoint etc. zeeman It is not easy but possible: function copyToClipboard(meintext) { if (window.clipboardData) window.clipboardData.setData("Text", meintext); else if (window.netscape) { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); if (!clip) return false; var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components

Copy to clipboard with break line

本秂侑毒 提交于 2019-11-27 15:16:42
问题 I want to copy a text to clipboard but in a new line. Problem: If you click the button in the snippet and paste in the notepad this is what you gonna get: Name: testSurname: testEmail: test@gmail.comAddress: testCity: testCountry: nullAd Category: testPlan: nullWebsite: Company name: testΜήνυμα: test What I want: I want, if possible, to copy text in a newline. The same as it is when you copy it: Name: test Surname: test Email: test@gmail.com ... function copyToClipboard(element) { var $temp =

Copy/Paste not working in a signed Applet

梦想的初衷 提交于 2019-11-27 14:51:38
I've a signed applet (which verifies correctly with jarsigner ) that for some reason will not allow copy and paste from the system clipboard into a JTextField despite the documentation telling me that it is supposed to work for signed applets. Furthermore, I've other applets which are signed with the same keyfile that do let me copy and paste text. I have searched high and low on the internet and can't seem to find any clues. What is making me pull my hair out is that there seems to be no way to debug this (no output in the console - no thrown exceptions). Does any one have any ideas on how I

Get html from clipboard in javascript

◇◆丶佛笑我妖孽 提交于 2019-11-27 14:38:41
问题 I need to implement task which is quite common feature for RichTextEditors - take HTML from clipboard. Can anyone help with guide on how to solve this task? It has to be cross platform (IE, FF, Chrome, Opera). I just started from this code: <script type="text/javascript"> $('.historyText').live('input paste', function(e) { var paste = e.clipboardData && e.clipboardData.getData ? e.clipboardData.getData('text/plain') : // Standard window.clipboardData && window.clipboardData.getData ? window