View Single Post
  #21 (permalink)  
Old 01-30-2010, 02:11 PM
nayr1482's Avatar
nayr1482
Regular 'Geeker
Offline
 
Join Date: Dec 2009
Posts: 312
Reputation: 1315
nayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on repnayr1482 is halfway to VIP status based on rep
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: iGuidance MortScript to get around TTS not always working

Quote:
Originally Posted by mswlogo View Post
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?)
Reply With Quote