Click to See Complete Forum and Search --> : [RESOLVED] waiting for process to start


jasonleee
December 22nd, 2009, 12:17 AM
Was wondering if anybody knew of a way to wait for a process to start before any messages are sent to it.
I create the process then have a function that will send a message to the button before the process is started. Thanks for any help

Igor Vartanov
December 22nd, 2009, 02:02 AM
WaitForInputIdle (http://msdn.microsoft.com/en-us/library/ms687022(VS.85).aspx)

jasonleee
December 22nd, 2009, 02:34 AM
Thanks that was what I was looking for! Any ideas if the program has another point where user input is required? It looks like it can only wait once for a process. Thanks

Igor Vartanov
December 22nd, 2009, 06:16 AM
Any ideas if the program has another point where user input is required?Typically a modal popup dialog is intended for interaction with user, and its popping can be detected by intercepting WM_ENTERIDLE (http://msdn.microsoft.com/en-us/library/ms645422(VS.85).aspx). But reliable interception of messages in a remote process requires some more knowlege, efforts and skills comparing to your original case.

And the last thing. Automating applications not designed to be automated may eventually appear a real headache. ;)

jasonleee
December 23rd, 2009, 12:51 AM
Thanks for the help :D