MathGroup Archive 2010

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

Search the Archive

Re: Push to clipboard?

  • To: mathgroup at
  • Subject: [mg110186] Re: Push to clipboard?
  • From: István Zachar <zac at>
  • Date: Mon, 7 Jun 2010 08:06:01 -0400 (EDT)
  • References: <hudcjc$d7g$> <hufu2e$efd$>

Yes, I'm aware of the method you suggested below, but since it does
not satisfy my needs, I've come to the very same conclusion: a
FrontEndToken must be used. Although I have no idea how to do that.
What I know is that I don't want to manually select anything, just
send the value of any named variable in memory to the clipboard. So no
manual selection, no extra notebook appearing, not any visual feedback
on the process. Actually ths functionality seems so obvious I wonder
why there isn't any established method to cover it.

> A Google search leads back to an old post in MathGroup that may help.
> Here's the URL:
> rizontal+palette+with+two+buttons%3A#89cb5f216f9daa00
> The particular code that I thought *might* be similar to what you're
> looking for:
> ButtonBox["Test4",
> ButtonFunction:>
> NotebookPut@
> Notebook[{Cell[BoxData[GridBox[{{ButtonBox["1"],ButtonBox["2"]}}]]]},
> WindowSize->{Fit,Fit},WindowElements->{},
> ShowCellBracket->False,WindowFrame->"Palette",
> WindowClickSelect->False,
> CellMargins->{{0,0},{0,0}},
> WindowFrameElements->"CloseBox",
> GridBoxOptions->{ColumnSpacings->0,RowSpacings->0}],
> ButtonEvaluator->None,
> Active->True]//DisplayForm
> ...although, after re-reading your post, it sounds like what you're
> wanting to do would involve a FrontEndToken. IMO, the documentation is
> not very helpful (i.e., no 'real' example uses, just tells you that a
> typical use is: FrontEndExecute[FrontEndToken["Copy"]])
> Hmmm... I think it would be really cool to make a function,
> initialized when Mathematica starts up, that would dynamically copy to the
> clipboard whatever you select in the current notebook. Perhaps one
> could even configure the function with several temp storage variables,
> so that, for example, Ctrl+p pasted the most recently highlighted bit
> and, say, Ctrl+p+1 would paste the next previous selection, and so
> on.
> Come to think of it, maybe a dynamically generated pallette with
> buttons showing an abbreviated version of the n different clipboard
> variables would be useful. The function PasteButton comes to mind...
> Also, I *believe* (just a hunch) such a feature could be evaluated
> using only the front end, avoiding potential variable collisions in
> the Global' context.
> Get to coding! :)
> -RG

  • Prev by Date: Re: Big memory needed
  • Next by Date: Re: PlotMarkers and DateListPlot
  • Previous by thread: Push to clipboard?
  • Next by thread: Re: Push to clipboard?