|
|
| "be consistent" | |
| PerlMonks |
Re^5: Absolute simplest way to keep a database variable persistent?by clwolfe (Scribe) |
| on Oct 11, 2008 at 03:37 UTC ( [id://716551]=note: print w/replies, xml ) | Need Help?? |
|
That's a good idea. It would have the downside that you'd have to flag the other process when you're done writing, and I think you'd have some headaches there. You'd probably have to introduce a waiting period - like, sleep for a second, check for file, read it, write out results, etc. Those seconds can add up. Fortunately, I finally sat down in front of Excel and here's what I whipped up. It actually works, which stunned me. First, in your VBA project, go to Tools->References, find 'Windows Script Host Model', and check the box. Next add this VBA code, or something like it: This handles starting and stopping the wordnet-ipc script, which can basically be as above. You should see a DOS box appear when you open the worksheet, if it's working right. You could add a sub to restart the perl process if it dies. Next step is to hook in your functions in VBA....
That should do the trick. I haven't tried it with WordNet, as I don't have it installed on my windows box, but I did write a simple Perl print-execute-wait loop, and it worked fine. best of luck! --Clinton
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||