|
||||
iGuidance MortScript to get around TTS not always working
In the spirit of the script written for iGo8 in the thread http://forum.ppcgeeks.com/showthread.php?t=88692
I've written a script to shutdown Sense UI, ActiveSync, HTCMessaging and start GPSGate and iGuidance and automatically restart Sense UI when you exit iGuidance. The Script is below but is also attached. Just copy the script to \Windows\Start Menu\Programs and then you and add a short cut to it from where ever you want. One click and you are up and running. EDIT 1: If you have VoiceCommand enabled you need to do the "Voice Command" notifications dance to get it out of the way from blocking TTS too. Switch back and forth between Notifications on Handset and Headset (with reboots in between. It does not seem to matter which you leave it on but toggling this and rebooting a few times seems to fix something that blocks TTS in navigation. EDIT 2: I attaced a new version that does not use KILL which is bad. EDIT 3: Acid test for TTS. Reboot, Send Text Message to yourself and wait for it. Open it an Click all Messages. Open Email and Click All Messages. Make Bluetooth call with Voice Command. Now try to run your Nav with TTS. With this script it will work as far as I can tell. Without loosing Voice Command. EDIT 4: New V3 Script now restarts Voice Command too. EDIT 5: Uploaded V4. Finally got around to adding timeouts. Also added opera 10. EDIT 6: Uploaded V5. Fixed issue where backup Kill Command could be issued too soon and not always free resources. Thanks to nayr1482 for finding this. EDIT 7: Uploaded V6. Just a very minor tweak that would only speed things up if you got a timeout error. EDIT 8: Uploaded V7. I blundered a copy paste error and it would not wait for manila to shutdown before proceeding. Thanks again to nayr1482 for his persistence in debugging what the script does. EDIT 9: Uploaded V8. I must of been drunk when doing V4. Found another error, Opera 10 was not being shutdown by it's window which could leave resources unreleased. Also noticed with the fix in V7 that manila did take longer than timeout value (5 seconds) on occasion so I bumped it up to 10 seconds. The inline text below is V8 # Shutdown Manila RegWriteDword("HKLM","Software\Microsoft\Today\Ite ms\HTC Sense","Enabled",0) RedrawToday Call( "WaitProcessDieWithTimeOut", "manila.exe", 20, 500 ) # In case we reboot or hang turn set Manila to start now before going further RegWriteDword("HKLM","Software\Microsoft\Today\Ite ms\HTC Sense","Enabled",1) # Remove warnings on unfound windows ErrorLevel("syntax") # Shutdown a bunch of trouble makers for TTS Call( "GentleKill", "ActiveSync", "Repllog.exe", 10, 500 ) Call( "GentleKill", "Opera Mobile 10", "Opera10-armv4i.exe", 10, 500 ) Call( "GentleKill", "Contacts", "poutlook.exe", 10, 500 ) Call( "GentleKill", "Outlook E-mail", , 10, 500 ) Call( "GentleKill", "Messaging", "tmail.exe", 10, 500 ) Call( "GentleKill", "HTC Messages", "Messaging_Client.exe", 10, 500 ) # Restart Voice Command (if you want to leave VoiceCmd off just comment out Run) Restart seems to work If ( ProcExists("voicecmd.exe") ) Call( "GentleKill", , "voicecmd.exe", 10, 500 ) Run("\Windows\StartUp\Voice Command.lnk") EndIf # If GpsGate installed prep it If (FileExists ( "\Program Files\GpsGate 2.0\GPSGateCE.EXE" ) ) # If GPSGate isn't running clear Running flag (so it won't prompt) to start then start it If (not ProcExists("GPSGateCE.EXE")) RegWriteDword("HKCU","Software\Franson\GpsGate","R unning",0) Run("\Program Files\GpsGate 2.0\GPSGateCE.EXE") EndIf EndIf RunWait("\Program Files\iNav\iGuidance\iGuidance.exe") # Loop until iGuidance Exits on it's own While ( ProcExists("iGuidanceVGA.exe") ) Sleep(500) # Igo8 may need this, not required for iGuidance (I uncheck "Dim Backlight While on Extrenal Power") # IdleTimerReset EndWhile # Gracefully close GPSGate (no need to wait) Close("Franson GpsGate") # We already preped to restart manila just trigger it now. RedrawToday Sub GentleKill Local( wname ) Local( pname ) Local( loops ) Local( delay ) wname = argv[1] pname = argv[2] loops = argv[3] delay = argv[4] if (Not IsEmpty( wname ) ) While ( WndExists( wname ) AND (loops > 0) ) Close( wname ) If ( WndExists( wname ) ) Sleep( delay ) EndIf loops = loops - 1 EndWhile If (loops = 0) Message( "Warning: Timeout Waiting for Window to Close " & wname ) ElseIf (Not IsEmpty( pname ) ) If ( ProcExists( pname ) ) Call ( "WaitProcessDieWithTimeOut", pname, loops, delay ) EndIf EndIf EndIf IdleTimerReset loops = argv[3] If (Not IsEmpty( pname ) ) If ( ProcExists( pname ) ) Kill(pname) Call ( "WaitProcessDieWithTimeOut", pname, loops, delay ) EndIf EndIf EndSub Sub WaitProcessDieWithTimeOut Local( pname ) Local( loops ) Local( delay ) pname = argv[1] loops = argv[2] delay = argv[3] if (Not IsEmpty( pname ) ) If ( ProcExists( pname ) ) While ( ProcExists( pname ) AND ( loops > 0 ) ) If ( ProcExists( pname ) ) Sleep( delay ) EndIf loops = loops - 1 EndWhile If (loops = 0) Message( "Warning: Timeout Waiting for Process to Die " & pname ) EndIf EndIf EndIf IdleTimerReset EndSub
__________________
EVO 4G, Stock Sprint ROM, ProClip in Car, Sony HBH-300.
Last edited by mswlogo; 02-09-2010 at 08:22 PM. |
This post has been thanked 3 times. |
|
||||
Re: iGuidance MortScript to get around TTS not always working
hi, thanks for the idea.
i tried this (i am not using gpsgate) and have had mixed results...sometimes TTS works sometimes not... i really like igo8 w/ tts - hoping you have some ideas how i can get it to work again (worked great on VzW 6.1, now on 6.5 i am struggling with it). I am already killing everything that i think i can though... kill TaskMgr.exe kill repllog.exe kill tmail.exe kill CMWifiRouter.exe Turning off TF3D... Any thoughts? With this my ram is around 42% only! TTS should work fine but it seems like it is hit or miss if it does... |
|
||||
Re: iGuidance MortScript to get around TTS not always working
Thanx I'm running mighty's 1/20 rom and TTS is on and off with this ROM with TF3d off. I'm gonna try it now and report back my results.
|
|
||||
Re: iGuidance MortScript to get around TTS not always working
Great work mswlogo. You beat me to it. After the discussion in the other thread, I added the kill lines to my script. It has helped tremendously, however my MightRom 1/20 decided not to let me use my tts again this morning. Still killing these with the script and no voice command. I think we are close to closing this case. I passed the thanks along, I appreciate your contribution.
|
|
||||
Re: iGuidance MortScript to get around TTS not always working
Mswlogo, I noticed your running GPSgate. How has this improved your performance. I have been wanting to try it, but I just never got around to it. Thanks.
|
|
||||
Re: iGuidance MortScript to get around TTS not always working
Quote:
This also shuts down GPSGate gracefully and patches things up in case you rebooted with it running. Only problem with this script is it does not break out of loops with time outs if close window never closes (I was lazy). I think this is better than the iGo script and can be easily adapted for iGo as well. FYI: use Task Manager to find the Top Level windows name and close that install of Killing apps. |
|
||||
Re: iGuidance MortScript to get around TTS not always working
See my link in my signature on GPS. It depends on what Nav software you use. You must use it for iGuidance (anything that must use a COM port).
|
|
||||
Re: iGuidance MortScript to get around TTS not always working
I added V3 of the script that restarts VoiceCommand.
|
This post has been thanked 1 times. |
|
||||
Re: iGuidance MortScript to get around TTS not always working
Seems to be working good. I modified it and droped the GPS gate code and changed to iGo8. I'll test a few days on different ROM's and report back. I'm currently running Energy Phoenix 2 21889 Jan 28 with Voice Command installed and running. Mike is planning a new release soon, so I will probably won't flash again till then, but I'll be back with an update Good job on the code. I was not aware of the kill issues. Thanks again. |
![]() |
|
|
|