Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Knowing when a process is finish under MSWindows

Status
Not open for further replies.

erixire

Technical User
Jun 4, 2002
72
CA
Hi,

I want to be able to start an executable file (batch file) with the command:

catch {exec $batch &} info

with the "&" sign to start it as another process because I want to do some other stuff in TCL at the same time as the batch to some other stuff. But I want to know when the process of the batch is finished so I can update my main window of TK to tell the user that the process is finished. Is it possible to do such a thing?

Thanks
 
It strikes me that you can use the tlist utility and
a proc to tell your program when the batch file has stopped processing using the OS which has been discussed previously in this group many times on tracking windows processes.

You can use after:
after 100 [list set rr [exec $batchfile]]
to start the batch file asyncronously and
reap the output and introduce a varaible for
an event trace (rr). I'm sure that tk has much
heightened event mechanisms for some of these tasks
relating to the gui.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top