| Author |
Comment/Response |
Bill
|
10/25/08 2:31pm
Hi:
I want to programatically place numbers from Windows XP clipboard into my Mathematica notebook.
For example, I can manually copy (Ctrl+c) the numbers {{1, 2}, {2, 3}, {4, 5}} to the clipboard, and then paste (Ctrl+v) them back into the notebook without any problem.
I used:
FrontEndExecute[FrontEndToken["Paste"]]
and this pastes {{1, 2}, {2, 3}, {4, 5}} back into the notebook from the clipboard. I want to use this data later on in the notebook, so I then rewrote the code to read:
pnts=FrontEndExecute[FrontEndToken["Paste"]]
which seemed to work, until I placed pnts in a new cell and hit enter. I got (Null).
Question: How can I get these numbers from the clipboard, so that I can assign a variable name to them that will work later on in my program? Again, I can do this manually, but how do I do this programatically? Please show me the code to
accomplish this.
Thanks,
Bill
URL: , |
|