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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateProcess, WaitForInputIdle, SendKey, and Spawned Processes

Status
Not open for further replies.

6volt

Programmer
Jun 4, 2003
74
US
I am automating a backtest algorithm that uses the NeuroShell 2 Batch Processor.

I use CreateProcess to execute it, and then WaitForInputIdle to wait for the appropriate steps requiring keystroke input via SendKeys.

I have 2 problems:

1) WaitForInputIdle and even Application.ProcessMessages will not establish a time late enough for SendKey input. I have to use Sleep to get sufficient delay.

2) When I have my SendKey input and execute, this program "spawns" (is that the correct usage of this term) another executable process which is what I need to test with WaitForInputIdle. From what I can tell, issuing WaitForInputIdle tests the CreateProcess executable which is idling while waiting for this spawned process.

QUESTION: How can I WaitForInputIdle on the full set of "spawned" processes/threads generated by the original CreateProcess process?

Thanks
Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top