Think you're an expert? Answer this!!!
Posted on 1998-10-19
Here's a hard question for all you experts.
I've got a vb program that calls a Perl script. The Perl script will then convert a group of SGML files to HTML files. If there are any errors during the conversion, the error messages will be put into a text file. The vb program will then check that text file and if it has error messages, those messages will appear in a textbox within the vb program.
The problem has to do with WHEN the vb program checks the text file. What happens is that the vb program calls the Perl script, the Perl script forks (creates) another process which does the actual conversion.
My vb program doesn't know this. As a result, it checks the text file before the conversion finishes, so any error messages during the current conversion will not be displayed inside the vb program.
Below is a part of the code I'm talking about:
'run the process.pl perl script
RetVal = Shell("perl.exe C:\temp\process.pl D:\folder, 1)
'function that displays error messages into textbox
...so does anyone know how to fix this? How do I make it so the vb program knows when the actual conversion is finished and doesn't print the error messages too soon. Thanks.