Importing files from Clipboard?
| gseaborn | August 22, 2008 - 13:59 | ||
|---|---|---|---|
|
Hi, To date, I've been importing data from CSV and binary files placed in a given directory. To speed things up a bit, I would like to import the data from the clipboard in stead. It would be placed there by a client application. I have to import files very frequently. Is there a way to effectively do the same thing as "FReadLine" and "Open", but from the clipboard in stead of from a specified filepath+filename? I've been browsing through the Igor Manual, but haven't found anything. Thanks |
|||

Joined: 2007-03-01
Location: United States
You're probably looking for the GetScrapText() function.
Joined: 2007-09-12
Location: Australia
I know that it won't solve your problem right this moment, but I will be extending SOCKIT in the near future.
At the moment the SOCKIT plugin allows IGOR to act as a TCPIP client.
The extension I'm thinking of will allow IGOR to act as a TCPIP server.
But this won't be bugfree for a whiletfrdewq
Joined: 2007-06-21
Location: United States
No, Open and FReadLine can not read from the clipboard.
LoadWave can load from the clipboard (specify no symbolic path and "Clipboard" as the file name).
Joined: 2008-08-01
Location: Canada
Thanks for your reply.
I noticed this, but didn't think it would work because in the manual it says the GetScrapText function returns a string containing any plain text on the Clipboard (aka “scrap”).
My problem is that I need to bring in a specifically-formatted CSV file and a specifically-formatted binary file. I can't just read them all in at once, and I don't think binary will work as plain text.
Maybe I'm wrong, but I don't think that this is going to work.
Joined: 2008-08-01
Location: Canada
LoadWave can load from the clipboard (specify no symbolic path and "Clipboard" as the file name).
Thanks - I got it going using LoadWave and then just did a lot of sscanf statements to parse the data.
I still haven't found a way to do binary though - is there any way to import binary information through the clipboard, or by any means faster than just reading from a binary file?
I need to read in a lot of data sets of binary data at rapid intervals, and am just trying to minimize the amount of time required to import it - it takes my client a more-than-ideal amount of time to export numerous large binary files too. It would be really nice if I could somehow transfer it (ideally through the clipboard) faster.
Thanks again
Joined: 2007-06-21
Location: United States
I can't think of a way to do it through the clipboard or faster than through a file.
It may not be possible to improve it but I'd have to know the details of the source to say for sure.
Joined: 2008-08-01
Location: Canada
OK thanks I suppose I'll stick to files.