PDA

View Full Version : Yet another shell wait question...



cusefan08
07-08-2014, 12:48 PM
I am trying to open a program on my local drive, wait for it to open(takes a few seconds), then go back into my code and start running again with the shell still open.

I can use the standard shell function but it will not wait for the program to open before continuing and I get an error. I've tried various ShellWait, WaitShell functions I've found through google and they open the program but don't start executing code again until the shell is exited.

Does anyone have a solution to this or can point me in the right direction?


Current(non working) Code:

Dim IDEAS As Double
IDEAS = Shell("C:\Program Files\IDEAS.exe")
AppActivate IDEAS, True
SendKeys "%fee", True


Thanks so much!

Movian
07-09-2014, 06:55 AM
hmmm I have played around with shelling out other applications, the only ones I have found that I can do what your asking are office applications using office automation.

if you are running the application on one machine and know how long it takes for the application to load you could sleep your program (if your app takes 3 seconds to open sleep for 6 then resume).