So what u want to do is read the output from ffmpeg and write it asynchronously to the Tk window? So that u can monitor the process without having to wait for the process to finish. First is there any way to make a Tk window take its input from a file handle? That would be the easy way to go.
The "real" way to do it is to open the file handle in non blocking mode and set up a loop to read from it. If there's no buffer data it sleeps a moment and tries again. If there is something to read it writes it to wherever. Look into Term::ReadKey which should do the job. If u need more than that u'll have to go into Fcntl and sysread. It doesn't work in ActivePerl so u would have to use Cygwin Perl. HTH. At 10:43 AM 10/19/2010 +0800, Daniel Burgaud wrote: >Hi > >I am trying to write a GUI application that will convert videos to another >format using >a program called FFMPEG. > >FFMPEG is basically text based apps which displays text "status" to standard >output. > >I would like my application to intercept these strings in real-time and >displays it on my very >own Tk Window > >Questions: >#1. How do I intercept these strings? > >#2. How do I call FFMPEG from within a perl script? >* Do I use backtick? >* Do I use Syscalls? > >Thanks >Dan -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 00000100 _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs