
Help: Exec command with TPW 1.5
:
: I have a problem with converting a program from DOS to Windows. I
: use the 'exec' command for executing some DOS batch files and exe
: files. This command isn't available within TPW. What can I do to get
: the following command working in TPW:
:
: exec('example.exe',parameters);
:
There is a similar command in windows:
NewProgram := WinExec( FileName+' '+Parameters, SW_ShowNormal);
{Requires both WinProcs and WinTypes units.}
Unlike DOS, your main program will continue running along with the new
program. It will NOT stop and wait for the other program to finish.
If this is a problem (it was for me), then you could loop while waiting
for the other program to finish:
and Buffer=FileName do
While GetMessage(Message,0,0,0) do begin
TranslateMessage(Message);
DispatchMessage(Message);
end;
Can anyone tell me a better way?
|\/| || Burnaby South Secondary School
Mathematics & Computer Science || (Canada)