Bill,

Thanks for your suggestion on using the Win32::GuiTest module.  I was able to monitor the process using this wonderful module.  I just have a follow-up question.  This may or may not be related to GuiTest.  In that same script that I'm writing, I also need to put another window in the background, it's basically a pop-up window that defaults to the foreground and I would not like the users to see it.  Is it possible to put that popup in the backgroud using GuiTest?

Thanks,
Sam
 







"$Bill Luebkert" <[EMAIL PROTECTED]>

Sent by:
[EMAIL PROTECTED]

04/15/05 07:41 PM

       
        To:        Sam Dela Cruz/SVL/SC/[EMAIL PROTECTED]
        cc:        [email protected]
        Subject:        Re: find when a process would terminate

        Classification:        




Sam Dela Cruz wrote:

>
> Hi all,
>
> I just need to find out when a process would terminate before I continue
> with my program.
>
> Here's the situation.   When I start my program, it looks to see if a
> certain process is running.  If it is, then I would like my program to
> wait till that process is terminated before continuing.  Had anyone of
> you done this before?
>
>  I'm thinking of getting the process id then monitor if the process id
> no longer exists by polling the process list again and again.  But I'm
> thinking that this may not be the proper way of doing it.  Is there a
> way to monitor if a process is terminating based on just he process id?

If you are in control of both processes, you could use a pidfile and
check if it's there and has a pid in it and if that pid is running.
If it's not there, start the task.  If it's there, but the pid isn't
running, remove the pidfile.  You could also use a semaphore or mutex.

If you don't have control of the other process, look at Win32::GUI/GuiTest
to use for finding an active process and maybe Win32::Process to create
a new own and control it.

--
 ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
(_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
 / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to