Message Boards Message Boards

1
|
3338 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

seeing the content of the clipboard before pasting

Posted 12 years ago
I often copy from the output. For example
ExampleData[]
and then copy one of the result in the list.

I find it impossible to predict (counting the clicks and predicting word separations) if the selection includes the quotes or not.

It matters, because when I "Paste' I need to know if I need to first insert the quotes or not.
I suppose I can add a toolbar to my default notebook that displays the text content of the clipboard. If I find a way to access it.

So my question is: " Is there a way to see dynamically the current value of the clipboard?" I tried:
Dynamic[CurrentValue["Clipboard"]]
Thank you,
Luc
POSTED BY: Luc Barthelet
A very close question was discussed on MathGroup in the following thread: Easy way to read clipboard? You need to click a few times "Next by thread" link under the post to see the replies. There was no dynamic automatic updating though. Based on those answers I suggest the following:
Dynamic[Refresh[NotebookGet[ClipboardNotebook[]][[1, 1, 1, 1]], UpdateInterval -> 0]]
But beware of complications. If you copy simple things - like strings, numbers, variables, etc. - this will work just fine. Nevertheless a clipboard can contain much more complicated expressions, - multiple cells for example. Then the resulting structure needs to be more carefully addressed than the trivial Part extraction [[1, 1, 1, 1]].
POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract