Quote:
Originally Posted by mswlogo
You used all If's and no While Loops. The problem is if you issue a close or kill and not verify it's done it could be running when igo8 starts up. But by the time you look with task manager they are gone.
Also tmail requires multiple close windows so it just loops killing windows until they are all gone. That is probably why you saw tmail.exe still running.
There is a method to my madness in my orignal script.
Like I said in an earlier post, you can do one better by looping on closed windows first until they close. Then loop waiting for the process to close.
Then continue to the next.
|
Maybe this is the way to go ??? I think this is what you are saying...
While ( WndExists( "ActiveSync" ) )
Close("ActiveSync")
Sleep(500)
EndWhile
While ( ProcExists("repllog.exe") )
Kill("repllog.exe")
Sleep(500)
EndWhile
Notice I moved the Sleep(500) AFTER the Close command. Why wait 500 before trying to close it if the window exists? If the window exists, close it first, then wait 500.
Using the While command - if the window or process does NOT exist - then it does not run the code inside correct (meaning it works like and If statement?)