Calling an OS (Shell) command

BlitzMax Forums/BlitzMax Programming/Calling an OS (Shell) command

The problem is not how you call the program, it is how you wait for the programs end.

About 99% of all routines i found in the internet waited for the programs end with a infinite waitforsingleobject.
So about 99% of all routines do it like mark did it in his source.

I guess normally that is ok, as i really did find only one program (travelbook5) where it did not work.

I tried every possible solution to start an external programm using createprocess winexec, shellexecute, shellexecuteex etc.

Until i found out that the problem did not relay on the way you call the program but on the way you wait for it's end.

I finally wrote my own routine to call external programs which handles window messages and so it even works with travelbook5 ;-)

But as i don't care for multi-platform compatibility, as i use windows only, and have no intend to ever release one of my programs ;-), i did not make the code public, yet.

Mirko