Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Programatically called data from clipboard' topicStudent Support Forum > General > "Programatically called data from clipboard"

Help | Reply To Topic
Author Comment/Response
10/25/08 2:31pm


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:


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:


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.



URL: ,
Help | Reply To Topic