clipboard

Send Text in Clipboard to Application like Notepad (C# or Powershell)

爷,独闯天下 提交于 2020-01-03 14:27:12
问题 I want to be able to send the text on the clipboard, in Windows, to an application. For example, I'm working on a text file in notepad, and I want to copy a portion out into a new file..I want to copy it to the clipboard and then use a hotkey to launch an application or powershell script that sends that copied text to a new instance of Notepad. How can I achieve this in C# or Powershell ? SOLUTION: Using AutoHotKey ^+c:: Send ^c Run Notepad WinWait Untitled - Notepad WinActivate Send ^v

Can't get ZClip to work

喜欢而已 提交于 2020-01-03 08:27:15
问题 I know it works even on this site but only when I trigger it via the h1 element, and I need to trigger it via an image (representing copy) but when I try it simply won't work. Here's my Javascript: $('#copyTxt').click(function(){ alert($('#Txt2Copy').text()); $(this).zclip({ path: '/scripts/js/ZeroClipboard.swf', copy: $('#Txt2Copy').text(), afterCopy: function(){ alert($('#Txt2Copy').text() + " was copied to clipboard"); } }); }); The alert was just for me to make sure it reaches and it does

how to reload saved “Embed Source” clipboard data?

匆匆过客 提交于 2020-01-03 06:05:07
问题 some other windows application I'm trying to interface with, saves a dump of the clipboard to file. To be more precise, it looks for the "Embed Source" format in the clipboard, and if found saves it to file. "Embed Source" is some OLE based format, which is created, for example, when you copy an image from paintbrush. Is there a way to reload the content of those files back to the clipboard, so I could paste them back in say, paintbrush or any office program? In c# I've tried System.Windows

Is Windows 'clip' blocked in Adobe ExtendScript?

浪子不回头ぞ 提交于 2020-01-03 04:27:44
问题 In Adobe ExtendScript (based on java script) you can trigger system commands as if you are in a Windows console with 'system.callSystem()' This works: system.callSystem("notepad c:/test.txt") Notepad opens with the content of the file. But these examples that try to paste to the clipboard don't work:" system.callSystem('clip < c:/test.txt') system.callSystem('dir | clip') I've tried numerous variations with 'clip' and none of them work. Is 'clip' blocked from working with ExtendScript, or am

Android - Copy image to clipboard, anyone got this working?

风格不统一 提交于 2020-01-03 02:57:30
问题 I am trying to copy a image file from my apk to the clipboard. Here is how I am approaching it (roughly, i'm using a content provider locally which is out of the scope of the question. ClipboardManager mClipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); ContentValues values = new ContentValues(2); values.put(MediaStore.Images.Media.MIME_TYPE, "Image/jpg"); values.put(MediaStore.Images.Media.DATA, filename.getAbsolutePath()); ContentResolver theContent =

Can I add a custom paste option to the windows text editing context menu?

梦想与她 提交于 2020-01-03 00:00:28
问题 I am looking for a way to add an option(s) to the right click context menu when editing text on a WinXP machine. I already do a lot of copy/pasting on it, so the clipboard is always changing, but there is one string I type repeatedly in almost every file I edit. I've already added some custom option to the context menu for .zip files to batch unzip them, but I'm not having any luck finding a way to add this. The machine is used for a single purpose and I try to keep it as stable as possible

Copying file details from Explorer as tabular text

旧街凉风 提交于 2020-01-02 07:10:23
问题 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

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

青春壹個敷衍的年華 提交于 2020-01-02 05:22:11
问题 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? 回答1: This appears to be a documented issue. MSDN

Parse prettyprinted tabular data with pandas

戏子无情 提交于 2020-01-02 04:36:06
问题 What is the best way to copy a table that contains different delimeters, spaces in column names etc. The function pd.read_clipboard() cannot manage this task on its own. Example 1: | Age Category | A | B | C | D | |--------------|---|----|----|---| | 21-26 | 2 | 2 | 4 | 1 | | 26-31 | 7 | 11 | 12 | 5 | | 31-36 | 3 | 5 | 5 | 2 | | 36-41 | 2 | 4 | 1 | 7 | | 41-46 | 0 | 1 | 3 | 2 | | 46-51 | 0 | 0 | 2 | 3 | Expected result: Age Category A B C D 21-26 2 2 4 1 26-31 7 11 12 5 31-36 3 5 5 2 36-41 2

Komodo Edit macro to replace a specific word in current document with clipboard content; is it possible?

泪湿孤枕 提交于 2020-01-01 19:29:07
问题 I created this macro to replace a specific word with another word in the current document, but ideally, I want to replace it with clipboard content. My current code is as follows: // Macro recorded on: Wed Jul 11 2012 01:29:42 GMT+0530 (India Standard Time) komodo.assertMacroVersion(3); if (komodo.view) { komodo.view.setFocus(); } ko.find.replaceAllInMacro(window, 0, 'Itemlink', 'target', true, 0, 2, false, false); The above code replaces the word 'Itemlink' with the word 'target', but how to