clipboard

Copying file details from Explorer as tabular text

你离开我真会死。 提交于 2019-12-05 19:52:13
I am looking for a way to easily copy the file details that appear in a Windows Explorer (details view) and paste it as tabular text. Ideally, the procedure would be to select some files in an Explorer, make a choice in the context menu (or use a shortcut key), and the list would be copied to the clipboard. When pasting, the tabular format would be preserved so that Excel would recognize the columns or Word keep tabs (or create a table). I would like to have a solution that transfers the available columns, and not just a predefined set a details such as name + size + date. Do you think that

Implementing 'Paste' in custom context menu

时间秒杀一切 提交于 2019-12-05 19:51:48
here is the problem I am trying to solve - I am not sure it is possible at all. I have a web app and I need to enable data copy/paste from the app and to the app, and I have a problem with paste. If I past with CTRL + V shortcut I can get the data from the clipboard using e.originalEvent.clipboardData.getData('text') in 'paste' eventhandler and it works fine. What I need to enable is 'Paste' from custom context menu and my first try was to dispatch paste event manually like this var event = new KeyboardEvent('paste', { view: window, bubbles: true, cancelable: true }); document.dispatchEvent

How do you read in a dataframe with lists using pd.read_clipboard?

こ雲淡風輕ζ 提交于 2019-12-05 18:22:08
问题 Here's some data from another question: positive negative neutral 1 [marvel, moral, bold, destiny] [] [view, should] 2 [beautiful] [complicated, need] [] 3 [celebrate] [crippling, addiction] [big] What I would do first is to add quotes across all words, and then: import ast df = pd.read_clipboard(sep='\s{2,}') df = df.applymap(ast.literal_eval) Is there a smarter way to do this? 回答1: For basic structures you can use yaml without having to add quotes: import yaml df = pd.read_clipboard(sep='\s

How to map yank to OS's clipboard in Vim? [duplicate]

旧街凉风 提交于 2019-12-05 18:13:58
This question already has answers here : Closed 7 years ago . Possible Duplicate: vim: copy selection to OS X clipboard While I succeeded to map paste from clipboard ( nmap <leader>p "*p ), the same for yank ( nmap <leader>y "*y ) doesn't seem working. Actually, it yanks in Vim's clipboard. Any idea how to do it properly? I know of clipboard=unnamed but I might keep the old yank/paste vim's commands. EDIT : It seems there is some confusion about my needs. The command "*y works . So there is nothing wrong with the +clipboard thing in my Vim env. What does not work is the mapping stuff. I want

Java thread goes to sleep when not in focus on OSX

我们两清 提交于 2019-12-05 18:09:44
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 implements ClipboardOwner { private Clipboard clipB = Toolkit.getDefaultToolkit().getSystemClipboard(); public

How do I save a copy of the clipboard and then revert back to it?

为君一笑 提交于 2019-12-05 17:52:18
I'm reading words in a text box by simulating the key presses required to highligh and copy the text. When I'm done, I want the clipboard to be exactly how I found it. I was hoping I'd be able to do something like this: IDataObject clipboardBackup = Clipboard.GetDataObject(); Clipboard.Clear(); //Save other things into the clipboard here, etc// Clipboard.SetDataObject(clipboardBackup); But that doesn't seem to work. It looks like you can go the route of specifically trying for text, audio, pictures, etc. and then saving them accordingly. (I guess 'data object' is specialized like that in my

put in and get out of clipboard in a loop without delays

血红的双手。 提交于 2019-12-05 15:54:15
I'm using the following code to copy text to Clipboard. System.Windows.Forms.SendKeys.SendWait("^c"); Then I use Clipboard.GetText() to get the text from Clipboard. It works fine, but it looks like it's delaying when I work with clipboard in a loop and I get content that should be overwritten with next copied text. If I put the Thread.sleep, it works fine. How could I fast copy and get the right content from Clipboard in a loop without delay? This appears to be a documented issue. MSDN acknowledges "timing issues" but doesn't include a way to completely get around them, although there does

Maximum size of Android Clipboard

柔情痞子 提交于 2019-12-05 15:37:29
问题 Is there a maximum size of Android Clipboard? On Nexus 5, I was trying to copy Facebook app's open source software license which is extremely long, but failed. Selecting all was succeeded, but I couldn't copy or share it. 来源: https://stackoverflow.com/questions/22041031/maximum-size-of-android-clipboard

How to use clipboard to copy data from Excel Sheet to DataTable?

旧巷老猫 提交于 2019-12-05 15:23:33
I have a Winform project, created on Microsoft Framework 3.5. The users may have installed Windows 7 or Windows XP, and Office 2007 or above. I'm working on in a procedure to get the clipboard data and put in on a C# DataTable. I already created a method to get the raw data from the clipboard and upload it in a DataTable. But in some cases, the Excel data shows a value, but internally have another: I'm investigating a method to get the raw data from Excel: string XmlFmt = "XML Spreadsheet"; var clipboard = Clipboard.GetDataObject(); if (clipboard.GetDataPresent(XmlFmt)) { var clipData =

Paste event listener on Internet Explorer getting wrong arguments

若如初见. 提交于 2019-12-05 14:18:54
问题 I'm handling the paste events for a contenteditable to clean all HTML markers before paste. All Works fine in Firefox and Chrome . But when I test my code in IE11 , the event object passed is not a ClipboardEvent but a DragEvent . Is there something wrong with my code? If I add the listener as the code bellow, should I get the clipboard event. Why I'm getting drag? editable.addEventListener('paste', pasteHandler, false); http://jsfiddle.net/vepo/4t2ofv8n/ To test the example above, I'm copy a