clipboard

Clipboard management with websites

ε祈祈猫儿з 提交于 2019-12-02 01:56:25
I would like to know how to put text into the clipboard like some popular websites are able to do. I have seen sites like www.photobucket.com and www.hulu.com somehow make copying to the clipboard automatic and cross browser. How can I do the same? I saw a cross browser way to do it using flash, but it won't work with the current version? Take a look at this: http://ajaxian.com/archives/seeding-the-clipboard-in-flash10-with-zero-clipboard One option is Clippy , "a very simple Flash widget that makes it possible to place arbitrary text onto the client's clipboard. Well, since Firefox disables

How to handle custom named index when copying a dataframe using pd.read_clipboard?

笑着哭i 提交于 2019-12-02 01:42:36
Given this data frame from some other question: Constraint Name TotalSP Onpeak Offpeak Constraint_ID 77127 aaaaaaaaaaaaaaaaaa -2174.5 -2027.21 -147.29 98333 bbbbbbbbbbbbbbbbbb -1180.62 -1180.62 0 1049 cccccccccccccccccc -1036.53 -886.77 -149.76 It seems like there is an index Constraint_ID . When I try to read it in with pd.read_clipboard , this is how it gets loaded: Constraint Name TotalSP Onpeak Offpeak 0 Constraint_ID NaN NaN NaN NaN 1 77127 aaaaaaaaaaaaaaaaaa -2174.50 -2027.21 -147.29 2 98333 bbbbbbbbbbbbbbbbbb -1180.62 -1180.62 0.00 3 1049 cccccccccccccccccc -1036.53 -886.77 -149.76 This

How can I prevent system clipboard image data being pasted into a WPF RichTextBox

穿精又带淫゛_ 提交于 2019-12-02 01:11:27
I have some code in place currently to intercept all Cut, Copy and Paste events into a RichTextBox in WPF. These are designed to strip all content out except plain text, and allow no pasting except plain text (by using a check the Clipboard.ContainsText() method.) This seems to be successful at preventing all such operations from inside the forms. A user can only copy, cut and paste text around, with images / audio data / random junk not being allowed. However, if I use the PrintScreen function, and paste it into one of the RichTextBoxes, the image is pasted in (not the wanted behaviour.) If

Gtk# Clipboard Copy/Cut/Paste files

梦想的初衷 提交于 2019-12-02 00:49:14
问题 How can I use Gtk# to copy, cut, and paste files to the clipboard. Every example I have seen only shows text being put into the clipboard. If anyone has an example I'd appreciate it. 回答1: if your application is running on Gnome/Unity you can use "x-special/gnome-copied-files" target type to move/copy files over clipboard. Once file copied you should be able to paste it using file manager and vice versa. Below is an example of a window class which does this: using System; using System.IO;

Can't copy to a clipboard from a background java application on MAC OSX

寵の児 提交于 2019-12-02 00:45:59
We have 2 java applications running on MAC. One background application sends either a text or image to a clipboard, then the other application grabs that data and paste it in its application. We have this problem when the app copies something on the clipboard, the background app won't be able to update the clipboard until it's UI becomes active. Is there work around with this clipboard issue? This works on Windows and Linux, it seems to be a problem only on MAC. Don't. What you are doing is generally referred to as "interprocess communication" . There are various strategies to accomplish this.

Handling spreadsheet data through the clipboard in GTK

微笑、不失礼 提交于 2019-12-02 00:17:51
问题 I'm using a GtkSheet widget in PyGTK to power my application's spreadsheet, and it gives me an API to pull and push data out of cells. (I looked at using GtkTreeView, but it seemed to be too much work) What I don't understand is how to intercept paste requests (via ie. CTRL+V) so that I can process them rather than passing it through to the widget. Currently, when pasting from a spreadsheet the data shows up as follows: becomes Is there a signal I should intercept? I'm on Ubuntu 9.10, Python

C# Add excel text-formatted data to clipboard

本小妞迷上赌 提交于 2019-12-01 23:50:13
问题 In C# I need to copy data-grid rows to excel. Because some values in a row are doubles, " -Infinity " values are possible. I've tried to copy the rows as DataFormats.UnicodeText or DataFormats.Text but this gave me the output " #NAME? " where I should see " -Infinity " (because excel automatically inserts a " = " before the minus in " -Infinity " due to the standard cell format). When I format the cells to " Text " before pasting, excel does not automatically insert an " = " before the "

How to swap clipboard contents for current selection in Visual Studio

醉酒当歌 提交于 2019-12-01 23:46:11
问题 Does anyone know of a simple way to swap whatever is currently in my clipboard with the current mouse selection? So lets say my clipboard has the text Foo in it. On a line of code public void DoBar() { ... I have Bar selected I'd like a simple key combination that changes DoBar() to DoFoo() and leaves me with the text Bar" in the clipboard (so that if I was to press CTRL-V it would paste Bar ). Note: I don't want to have to fiddle with anything graphical (i.e. clipboard switcher, paste ring).

navigator.clipboard is undefined

拈花ヽ惹草 提交于 2019-12-01 18:17:05
Why is navigator.clipboard always undefined in the following snippet? var clipboard = navigator.clipboard; if (clipboard == undefined) { console.log('clipboard is undefined'); } else { clipboard.writeText('stuff to write').then(function() { console.log('Copied to clipboard successfully!'); }, function() { console.error('Unable to write to clipboard. :-('); }); } More on the clipboard API can be found here . Chrome Version: 68.0.3440.106. I'm sure this was working at some point, but no longer is. It's confusing because this table suggests that the Clipboard API is implemented in Chrome (has

Cross-browser method to prevent all methods of text copying from a textarea?

…衆ロ難τιáo~ 提交于 2019-12-01 17:37:22
I am working on an online typing software. In the typing software, all is going well but I have the problem of dishonest users who might possibly type the text into the textarea, copy it, then reload the page (therefore resetting the timer) and pasting it in straightaway. So I was thinking along the lines of using something like evt.preventDefault(); when javascript detects the pressing of the ctrl / cmd button along with the C key. But then I realized that the user could always go up to the menu bar to press Edit -> Copy . So I was wondering, is there a cross-browser method to disable both