Re: RE: Re: copying
- To: mathgroup at smc.vnet.net
- Subject: [mg45814] Re: [mg45775] RE: [mg45751] Re: copying
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Mon, 26 Jan 2004 01:53:17 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200401240536.AAA07499@smc.vnet.net>
- Reply-to: murray at math.umass.edu
- Sender: owner-wri-mathgroup at wolfram.com
It's the final step you mention below at which things always choke when I try to follow such instructions about creating a palette: After generating a palette from the selection, I have an open notebook with an Untitled-... on its title bar. But I cannot save it: Save As does not open the expected dialog box where I designate the place and name under which to save the notebook. David Park wrote: > ... About a month ago Bobby Treat posted code for a palette that allows you to > simply select and copy Mathematica code in InputForm. I find this quite > useful. I have attached a copy of the code below. Paste it into a notebook > and choose to interpret it so that it will create a new notebook with a > button. Then select it and generate a palette from the selection. Save it in > Configuration/FrontEnd/Palettes. > ************************************************************************ > > Notebook[{ > Cell[BoxData[ > ButtonBox[\(Copy\ As\n > \ InputForm\), > ButtonFunction:>Module[ {cpy, cpynb, evalnb}, > CompoundExpression[ > Set[ cpy, > NotebookRead[ > InputNotebook[ ]]], > If[ > SameQ[ cpy, {}], > Return[ ]], > Set[ cpynb, > NotebookCreate[ Visible -> False]], > NotebookWrite[ cpynb, cpy], > SelectionMove[ cpynb, All, Notebook], > FrontEndExecute[ { > FrontEndToken[ > cpynb, "SelectionConvert", "InputForm"]}], > Set[ evalnb, > NotebookPut[ > Notebook[ > Map[ Cell[ #, "Input"]&, { > BoxData[ > RowBox[ {"cpynb", "=", > ToBoxes[ cpynb]}]], > "FrontEndExecute[{FrontEndToken[cpynb, \ > \"CopySpecial\",\"PlainText\"]}]", > "NotebookClose[cpynb]", > "NotebookClose[EvaluationNotebook[]]"}], Visible -> > False]]], > SelectionMove[ evalnb, All, Notebook], > SelectionEvaluate[ evalnb], Null]], > ButtonEvaluator->Automatic, > Active->True]], NotebookDefault, > CellMargins->{{Inherited, Inherited}, {7, Inherited}}, > PageBreakAbove->True, > CellLabelMargins->{{12, Inherited}, {Inherited, Inherited}}, > InputAutoReplacements->{ > "->"->"\[Rule]", ":>"->"\[RuleDelayed]", "<="->"\[LessEqual]", > ">="->"\[GreaterEqual]", "!="->"\[NotEqual]", "=="->"\[Equal]", > Inherited}, > "TwoByteSyntaxCharacterAutoReplacement"->True, > Hyphenation->True, > LineSpacing->{1.25, 0}, > ScriptMinSize->9, > CounterIncrements->"Text", > StyleMenuListing->None, > FontFamily->"Courier"] > }, > FrontEndVersion->"5.0 for Microsoft Windows", > ScreenRectangle->{{0, 1280}, {0, 941}}, > WindowSize->{492, 740}, > WindowMargins->{{21, Automatic}, {Automatic, 27}} > ] > > > -- Murray Eisenberg murray at math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
- References:
- RE: Re: copying
- From: "David Park" <djmp@earthlink.net>
- RE: Re: copying