clipboard

Want to know Windows Clipboard Internals

♀尐吖头ヾ 提交于 2019-12-04 11:25:20
I am interested in learning windows system internals and how things work. I am inclined towards learning system programming on windows. With that context, I am curious to know few things on how windows clipboard internally functions: What precisely happens when we select some text, image etc and press Ctrl + C ? What precisely happens when we we press Ctrl + V in different application? Where exactly the copied data resides? Does the copied data go into kernel mode memory - that is shared across all processes? How the copied data becomes available to a different process? I want to know the

Listener for clipboard content change?

天涯浪子 提交于 2019-12-04 11:01:03
问题 Is there a way to register a method so that it's automatically called as soon as the user ends "text selection mode" (thereby copying selection to clipboard)? 回答1: I think you're looking for ClipboardManager.addPrimaryClipChangedListener(). Edit - this is for Android 3.0, and I don't see any other clipboard-related apis in the earlier levels. Also see the ClipboardManager docs in the copy and paste guide. 回答2: If you are using Android 3.0 you can add a listener with ClipboardManager

Setting images to Clipboard - Java

我与影子孤独终老i 提交于 2019-12-04 10:53:55
I'm making a program using java that sends the clipboard contents over sockets; I managed to make it work with strings but I'm having some troubles with images. Here is the code: //get Image Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); Image imageContents = (Image)clipboard.getData(DataFlavor.imageFlavor); ImageIcon image = new ImageIcon(imageContents); //sent over sockets //set Image String mime = DataFlavor.imageFlavor.getMimeType(); DataHandler contents = new DataHandler(image,mime); //set clipboard clipboard.setContents(contents, null); After setContents the

Holding down on text in iOS does not bring up the 'copy' button on jQueryMobile Dialog when using ajax

本秂侑毒 提交于 2019-12-04 10:41:30
I am talking about one of these Dialog boxes that pop up: http://jquerymobile.com/test/docs/pages/page-dialogs.html (short url for mobile http://bit.ly/KhCGVD ) Click 'Open Dialog' -- on that dialog box, nothing is copy-able in iOS without unless 'data-ajax="false"' is used in the link. (works fine on Android) Putting '-webkit-user-select: auto!important;' (or 'text' instead of 'auto') does nothing. Adding the javascript 'document.documentElement.style.webkitTouchCallout = "auto";' does nothing. I am desperate to make this work as I have built an entire thing around the assumption that copy

Pipe output to the clipboard using PowerShell

只愿长相守 提交于 2019-12-04 10:00:00
问题 In PowerShell, how do you pipe the output of a command to the clipboard but Still be able to pipe the data to more processes No dependencies on external applications like clip.exe for it to work as a filter, so we see output on the command line immediately ? EDIT: 14 May 2015 After 3 years, I thought I would share my ClipboardModule (I hope I am allowed to): Add-Type -AssemblyName System.Windows.Forms Function Get-Clipboard { param([switch]$SplitLines) $text = [Windows.Forms.Clipboard]:

Import assignment cannot be used when targeting ECMAScript 2015 modules

拥有回忆 提交于 2019-12-04 09:57:08
问题 I'm trying to use the follwing line: import Clipboard = require('clipboard'); and I get the following error: [default] c:\xampp\htdocs\isitperfect\node_modules\angular2-clipboard\src\clipboard.directive.ts:2:0 Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead. The error is in this line: import Clipboard = require('clipboard'); I tried: import * as

Copy to clipboard in JavaScript

孤街醉人 提交于 2019-12-04 09:39:34
Is there a way at all of altering the clipboard of the user via JavaScript? I want it that they click a given point on a map, and it adds the coordinates of the position to their clipboard. I do however assume that this is not possible for JavaScript to achieve. You could try using the zeroclipboard library, which involves placing an invisible flash element on the page to do the actual copy of text to the clipboard. Martijn Laarman It is in Internet Explorer, but not in other browsers although support can be hacked together in other browsers by inserting a Flash file each time you want to do a

How can Python access the X11 clipboard?

风流意气都作罢 提交于 2019-12-04 09:21:55
问题 I want my Python script to be able to copy and paste to/from the clipboard via x11 (so that it will work on Linux). Can anyone point me to specific resources I can look at, or the concepts I would have to master? Is this possible to do with the Python X library at http://python-xlib.sourceforge.net ? 回答1: I favor a Tkinter-based solution over one which requires pygtk, simply because of the potential the latter has for installation challenges. Given this, my recommendation to Alvin Smith is to

Allow user to copy image from picturebox and save it everywhere

余生颓废 提交于 2019-12-04 08:19:40
In my application I have a pictureBox that shows an image. When user right clicks on the pictureBox and selects Copy from the context menu, I want to copy the image into the clipboard so the user can paste it in folders and anywhere else. How can I do that? EDIT: I use this code but by this user only can paste image into word. var img = Image.FromFile(pnlContent_Picture_PictureBox.ImageLocation); Clipboard.SetImage(img); Arash Milani Clipboard.SetImage copies the image content (binary data) to the clipboard not the file path. To paste a file in Windows Explorer you need to have file paths

How can I get a script's output to be copied to the Windows clipboard?

怎甘沉沦 提交于 2019-12-04 07:37:27
I find myself running scripts and copy-pasting the output of these runs into emails or into some other documents. Is there a way such that I can make the copy-to-clipboard step a part of the script itself? Most of my scripts are either Perl or bat files and I work on Windows. Thanks. There's a utility called clip.exe that you can use. Just pipe the output of your script or any other command into clip.exe (First, put it on your path somewhere. If you don't have a usual place for these kindss of utilities, you can dump it in the directory you usually run your scripts from, or I've known people