Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Push to clipboard?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110259] Re: Push to clipboard?
  • From: magma <maderri2 at gmail.com>
  • Date: Thu, 10 Jun 2010 08:10:27 -0400 (EDT)
  • References: <hudcjc$d7g$1@smc.vnet.net> <huincm$o10$1@smc.vnet.net>

On Jun 9, 1:18 pm, David Bailey <d... at removedbailey.co.uk> wrote:
> 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 noteb=
ook).
> > 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

Well then, there is your solution Istvan.
ClipboardNotebook[] is an undocumented way to access the clipboard.
For some reason, regular users are not supposed to know of its
existence.
However note that you get the context of the variables in your
expression too.
I doubt this is what you really like, if you mean to paste into a
different program



  • Prev by Date: why does CopyFile choke on transparently encrypted files?
  • Next by Date: Re: Programatically creating delayed
  • Previous by thread: Re: Push to clipboard?
  • Next by thread: Re: Push to clipboard?