jeudi 2 avril 2015

tcl : Execute a windows command line and see the "flow" of the application

I have tried the following code :





set my_cmd "|tracert google.com"

puts "Now executing the command '$my_cmd':\n"

set f [open $my_cmd "r"]

#process command output
while {[gets $f line] != -1} {
# print line
puts $line
}

close $f



and it works for tracert I see the program running flow line by line, but with my application (the one runs in the attached image), it's wait for the application to finish, only then shows all the output. Tried several ways also with "exec" and no luck.


it is only works if i do as so : enter image description here


What tcl code can make it work ?


Aucun commentaire:

Enregistrer un commentaire