Re: Push to clipboard?
- To: mathgroup at smc.vnet.net
- Subject: [mg110216] Re: Push to clipboard?
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Wed, 9 Jun 2010 07:18:45 -0400 (EDT)
- References: <hudcjc$d7g$1@smc.vnet.net> <huincm$o10$1@smc.vnet.net>
On 07/06/10 13:06, magma wrote:
>
> The clipboard is meant to be used for things that have been selected
> (manually or programmatically) from some place (in Mathematica: a notebook).
> Any other unconventional use would not adhere to the standard GUI
> conventions (tautologically) and probably reflects a not very well
> thought out interface.
>
I disagree with this philosophy, in that when you build an interface, a
"Copy" button copies whatever it is that the program is logically
manipulating at that point - which may not be what is on the screen.
There is some functionality in Mathematica to handle this, but you
probably need to experiment a bit to get the effect just right. Here is
an example to start Istvan off:
In[4]:= fred = {a, b, c}
Out[4]= {a, b, c}
In[6]:= NotebookWrite[ClipboardNotebook[], fred]
Global`a
Global`b
Global`c
David Bailey
http://www.dbaileyconsultancy.co.uk