clipboard

vim - yank entire file

I often write something in gvim, then need to copy-paste it into another application. Is there an easy way to yank the entire file? I usually do something like this, but is there a better way that I'm missing out on? ggVG"+y (Go to top, visual-line mode, go to bottom, yank) ...

Unable to use X clipboard in Screen

I read the following code in Unix Power Tools on page 117 *VT100.Translations: #override\ Button1 <Btn3Down>: select-end(primary,CUT_BUFFER0,CLIPBOARD)\n\ !Shift <Btn2Up>: insert-selection(CLIPBOARD)\n\ ~Shift ~Ctrl ~Meta <Btn2Up>: insert-selection(primary,CUT_BUFFER0) I have not managed to see any effect of the above ...

Unable to use Screen's clipboard inside Firefox

I have not managed to get my pbcopy/pbpaste to work in Screen as discussed here. I aim to solve the problem by having Screen clipboard inside Firefox. Its paste works in terminal by the following command but not in Firefox C-a ] How can you use Screen's clipboard inside Firefox? ...

How to disable copy/paste in TEdit

I would like to prevent copy, cut and paste in my TEdit. How can I do this? I tried setting the Key=NULL on KeyDown event when CTRL+V was pressed on the control, but it didn't work. ...

Office clipboard format

If I copy a graph from Excel (2007) and choose Paste Special in another Office app, I see a clipboard format called "Microsoft Office Graphic Object", which allows different customizations than Enhanced Metafiles. How do I create such a clipboard object from my own (C++) app so it gets the first-class treatment from Office app? It's not...

Copy & Paste in Firefox

While working on a wysiwyg editor, I hit the wall of Firefox restricting access to the clipboard (haven't yet tested Webkit). Can someone explain WHY copying to the clipboard is restricted? I just cannot think of a single way that this can be used nefariously, and use-cases abound where lack of 'copy' support is a problem. In fact, who...

Clipboard Tool to Paste Several Version Back

I'm working on migrating some Flash files from AS2 to AS3, and I'm realizing that there are several pieces of text that I need to copy over and over and over. Right now I have those pieces of text in an open notepad file, but I would love to have the ability to store those pieces in a clipboard so I can easily access them like by pushin...

How to load an Ajax response into clipboard using jQuery and ZeroClipboard?

I need a way to copy dynamically (Ajax) loaded content into the clipboard in a Web browser. There are many libraries out there that will mimic the copy-to-clipboard functionality using Flash. However, with the new Flash 10 default security settings, copy-to-clipboard setting now requires explicit user confirmation. ZeroClipboard is a J...

How to assign permissions for Copy/Paste on windows

Well, as everyone knows there is no way you can assign permissions for Copy/Paste of files on windows platform. I need to control the copy process from a central file server, in a way that helps me know: which user performed the copy Which files were copied where did he pasted them Total size of data copied Time of copy operation If u...

How to copy the contents of a String to the clipboard in C#?

If I have some text in a String, how can I copy that to the clipboard so that the user can paste it into another window (e.g. from my application to Notepad)? ...

Black background while copying image from Firefox

An image is copied from Firefox into the Clipboard. My program gets it from clipboard and saves as a JPEG image. For some reason the image is saved with a black background. If I open the same URL in IE and copy the image into the Clipboard, the image is saved correctly by my program. I am using Delphi 7. I also tried to copy the image f...

How to copy a RTF string to the clipboard in delphi 2009?

Here is my code that was working in Delphi pre 2009? It just either ends up throwing up a heap error on SetAsHandle. If I change it to use AnsiString as per original, i.e. procedure RTFtoClipboard(txt: string; rtf: AnsiString); and Data := GlobalAlloc(GHND or GMEM_SHARE, Length(rtf)*SizeOf(AnsiChar) + 1); then there is no error but...

Yank file name / path of current buffer in Vim

Assuming the current buffer is a file open for edit, so :e does not display E32: No file name. I would like to yank one or all of: The file name exactly as show on the status line, e.g. ~\myfile.txt A full path to the file, e.g. c:\foo\bar\myfile.txt Just the file name, e.g. myfile.txt ...

How to preserve the contents of the clipboard

Hi all, Is there a way to preserve the contents of the clipboard? I tried the following code but it doesn't work. Dim iData As IDataObject = Clipboard.GetDataObject() ...(use clipboard) Clipboard.SetDataObject(iData) Thank you. ...

Multiple lines of text to clipboard

Is there a way to send multiple lines of text to the clipboard using javascript? IE, I want to send: abc def ghi and not abcdefghi (and although right now i need to learn how to do it in Javascript, I would not mind hearing how it is done in other languages, like python) ...

How do I get rid of the "cannot empty the clipboard" error?

Right now, I'm getting it in Excel 2007, but I've gotten the same error in pretty much every version of Excel I've used since 97. The only discernable similarity is that happens on my office PC. It's never bothered me on my home PC. In Excel 2003, I was able to mess around in the clipboard options until it went away. In 2007, though,...

How to handle blocked Clipboard and other oddities.

Over the course of the last couple of hours I have been tracking down a fairly specific bug with that occurs because another application has the clipboard open. Essentially as the Clipboard is a shared resource (as per "Why does my shared clipboard not work?") and you attempt to execute Clipboard.SetText(string) or Clipboard.Clear()....

Copying selected text to a Swing Java app?

My goal is assign a global hotkey (JIntellitype, JXGrabKey) that would pass an arbitrary selected text to a java app. The initial plan is to utilize the java.awt.Robot to emulate Ctrl-C keypress and then get the value from clipboard. Probably there's a more elegant solution? EXAMPLE: Open Notepad, type in some text, select that text. ...

Get CSV Data from Clipboard (pasted from Excel) that contains accented characters

SCENARIO My users will copy cells from Excel (thus placing it into the clipboard) And my application will retrieve those cells from the clipboard THE PROBLEM My code retrieves the CSV format from the clipboard However, the if the original Excel content contains characters like ä (a with umlaut) then retrieved CSV string doesn't hav...

Clipboard viewer for programming purposes

I need a clipboard viewer in order to understand the type and contents of the data I'm receiving. Is there any such program available, (for Windows) that lets you explore any type of data currently in the clipboard? ClipSpy: Unfortunately the only workable multi-format viewer, ClipSpy, shows me the string data wrapped every 10 character...