clipboard

Programmatically (C#) convert Excel to an image

吃可爱长大的小学妹 提交于 2019-11-29 03:00:12
问题 I want to convert an excel file to an image (every format is ok) programmatically (c#). Currently I'm using Microsoft Interop Libraries & Office 2007, but it does not support saving to an image by default. So my current work-around is as follows: Open Excel file using Microsoft Interop; Find out the max range (that contains data); Use the CopyPicture() on that range, which will copy the data to the Clipboard. Now the tricky part (and my problems): Problem 1: Using the .NET Clipboard class, I

Copy to clipboard with break line

一世执手 提交于 2019-11-29 02:05:55
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 = $("<input>"); $("body").append($temp); $temp.val($(element).text()).select(); document.execCommand(

Get html from clipboard in javascript

試著忘記壹切 提交于 2019-11-29 01:23:43
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.clipboardData.getData('Text') : // MS false; alert(paste); });</script> Both window.clipboardData and e

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

放肆的年华 提交于 2019-11-29 00:45:33
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 and checked out their API, but that's it, this page: http://farter.users.sourceforge.net/blog/2010/11

How to paste CSV data to Windows Clipboard with C#

﹥>﹥吖頭↗ 提交于 2019-11-28 22:19:42
问题 What I'm trying to accomplish My app generates some tabular data I want the user to be able to launch Excel and click "paste" to place the data as cells in Excel Windows accepts a format called "CommaSeparatedValue" that is used with it's APIs so this seems possible Putting raw text on the clipboard works, but trying to use this format does not NOTE: I can correctly retrieve CSV data from the clipboard, my problem is about pasting CSV data to the clipboard. What I have tried that isn't

How can I fix “Cannot open clipboard: Access Denied” errors?

一曲冷凌霜 提交于 2019-11-28 20:43:57
I am using the following code to copy text to the clipboard: Clipboard.Open; try Clipboard.AsText := GenerateClipboardText; finally Clipboard.Close; end; Seemingly at random I get "Cannot open clipboard: Access Denied" errors. I'm guessing that these errors are caused by other application locking the clipboard, but I never seem to be doing anything with other applications that should cause the locks. Strangely my users seem to be reporting more of the errors with Vista and Windows 7 than with XP. Is there a way to check if the clipboard is locked before trying to access it? This is not a

How to write from R to the clipboard on a mac

蓝咒 提交于 2019-11-28 18:48:24
I am trying to use the write.table function to write to my clipboard on a mac os system. From other threads, I've tried data <- rbind(c(1,1,2,3), c(1,1, 3, 4), c(1,4,6,7)) clip <- pipe("pbcopy", "w") write.table(data, file="clip") close(clip) This code does not give any error messages, but also does not copy anything to the clipboard. any suggestions? juba I don't have any machine under OS X to test it, but I think you should use just clip instead of "clip" : data <- rbind(c(1,1,2,3), c(1,1, 3, 4), c(1,4,6,7)) clip <- pipe("pbcopy", "w") write.table(data, file=clip) close(clip) Here clip is an

Trigger an event when clipboard content changes

偶尔善良 提交于 2019-11-28 18:01:57
I'm trying to get the clipboard content using a Python script on my Mac Lion. I'm searching for an event or something similar, because if I use a loop, my application spends all its time watching the clipboard. Any ideas? Thorsten Kranz Have you thought about using an endless loop and "sleeping" between tries? I used pyperclip for a simple PoC and it worked like a charm, and Windows and Linux. import time import sys import os sys.path.append(os.path.abspath("SO_site-packages")) import pyperclip recent_value = "" while True: tmp_value = pyperclip.paste() if tmp_value != recent_value: recent

Is there a way to directly send a python output to clipboard?

冷暖自知 提交于 2019-11-28 17:57:41
For example, if a python script will spit out a string giving the path of a newly written file that I'm going to edit immediately after running the script, it would be very nice to have it directly sent to the system clipboard rather than STDOUT . NullUserException You can use an external program, xsel : from subprocess import Popen, PIPE p = Popen(['xsel','-pi'], stdin=PIPE) p.communicate(input='Hello, World') With xsel , you can set the clipboard you want to work on. -p works with the PRIMARY selection. That's the middle click one. -s works with the SECONDARY selection. I don't know if this

Copying stuff from vim running in putty

久未见 提交于 2019-11-28 17:56:27
I am running Vim 6.3 through putty and putty connection manager. I have the mouse option set (set mouse = a). I am able to paste things from the (windows) clipboard to vim by but selecting text in vim isn't copying anything to the clipboard. Does anyone know how do I do this? Note: I can't update Vim to a newer version. You can select some text with the mouse and then type: "*y to yank the selected text to the clipboard, then you should be able to use the clipboard content in another application. if "*y is to cumbersome to type, you can put the following in host .vimrc :noremap y "*y Hold down