Well, but I don't get it. A do-file is running automatically. At some point you get it to pop some result into the clipboard. Now you have some other program running, say in Python or C++, and it, too, is running automatically. So either you've got to program in a delay that makes that other program sleep until the clipboard has something to offer it, or you're going to have a mess. Also, if you have several programs in operation that also use the clipboard (I sometimes, for example, do word processing while I am waiting for a long Stata program to finish running), you need to program some way for the receiving program to figure out which clipboard it's supposed to capture data from. I don't know enough Python or C++ to say for sure these things can't be done--probably they can with some relatively obscure functions--but I certainly don't know how to do it.
So the synchronization of these programs sounds like a nightmare to me, and my instinct would be to pass the result between programs using, say, a text file as a go-between: it's very easy for the receiving program to test for the existence of the anticipated file and, if necessary, wait for it to appear. The file-open functions themselves would provide the needed information.
So the synchronization of these programs sounds like a nightmare to me, and my instinct would be to pass the result between programs using, say, a text file as a go-between: it's very easy for the receiving program to test for the existence of the anticipated file and, if necessary, wait for it to appear. The file-open functions themselves would provide the needed information.
Comment