Tag Info

Hot answers tagged

14

Declaration: This method for Windows is based on the .NET code from Todd Gayley's this wonderful answer. My .NET knowledge is absolutely ZERO, all credit goes to Todd. Code: The main idea is to extract the "Input"-style code string, convert it to the UTF-16 little endian form, which is the standard byte order in Windows, feed the bytes to system clipboard ...


8

As Mr.Wizard showed me here. Run the following with " " replaced with the pasted data. For example: CellPrint@Cell[ First@FrontEndExecute@UndocumentedTestFEParserPacket["Print[ \"test\" ]", False], "Input"] And here is a Palette with a Button that automates the process. CreatePalette@Button["Paste", NotebookWrite[InputNotebook[], ...


4

As a start we can create a basic paste function using the ClipboardNotebook as follows: pasteRaw[] := NotebookGet[ClipboardNotebook[]] /. Notebook[{Cell[BoxData[data_] | data_, ___]}, ___] :> (CellPrint[Cell[BoxData[data], "Input"]];) After copying the desired text you can evaluate pasteRaw[] to paste it as input. At present no syntax checking ...


2

Here's how to add a permanent menu item and keyboard shortcut for Silvia's solution. (This can be easily adapted to Jens' solution for Mac OS.) 1. Add Package Copy Silvia's first code block that starts with Needs["NETLink`"] to a file and save it as UniCodeCopy.m in one of the directories included in $Path. 2. Initialize the Front End Save the ...



Only top voted, non community-wiki answers of a minimum length are eligible