Re: Obtaining the output from the line above.
- To: mathgroup at smc.vnet.net
- Subject: [mg59345] Re: Obtaining the output from the line above.
- From: Patrick.John.Wheeler at gmail.com
- Date: Sat, 6 Aug 2005 01:29:46 -0400 (EDT)
- References: <dcpkfe$6dj$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Dear Joe and math group, Hi everyone first time post here so hello every one. This may not be exactly what you are looking for Joe but it is a start. CurrentNotebook=EvaluationNotebook[]; SelectionMove[CurrentNotebook,Cell,EvaluationCell]; SelectionMove[CurrentNotebook,Previous,CellContents]; LastCell=NotebookRead[CurrentNotebook]; SelectionMove[CurrentNotebook,After,EvaluationCell]; NotebookWrite[CurrentNotebook, LastCell ]; SelectionMove[CurrentNotebook,After,EvaluationCell]; NotebookWrite[CurrentNotebook, Cell[LastCell[[1]],"Input"] ]; This Code takes the Output Cell above the EvaluationCell or just the cell above it weather or not it is a output cell. It then copies the cell and writes it below the EvaluationCell and then writes the cell again, but this time as a Input cell. For more information on notebook manipulation look at 2.11.1 to 2.11.3 in The Mathematica Book. PJW