PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-28-2010, 01:39 AM
mswlogo's Avatar
VIP Member
Offline
Pocket PC: EVO 4G
Carrier: Sprint SERO Premium
Location: MA, USA
 
Join Date: Jun 2007
Posts: 1,330
Reputation: 970
mswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Reply With Quote
This post has been thanked 3 times.
  #2 (permalink)  
Old 01-28-2010, 03:44 PM
mswlogo's Avatar
VIP Member
Offline
Pocket PC: EVO 4G
Carrier: Sprint SERO Premium
Threadstarter
Location: MA, USA
 
Join Date: Jun 2007
Posts: 1,330
Reputation: 970
mswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: iGuidance MortScript to get around TTS not always working

I added a note about voice command. I tried this script this morning, after text messaging running bluetooth voice command etc. Then started up navigation and it worked great. It's very smooth too.
Reply With Quote
  #3 (permalink)  
Old 01-28-2010, 07:20 PM
nayr1482's Avatar
Regular 'Geeker
Offline
Pocket PC: HTC Touch Pro2
Carrier: Verizon
 
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

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...
Reply With Quote
  #4 (permalink)  
Old 01-28-2010, 07:34 PM
gmfeny's Avatar
Almost a VIP
Offline
Pocket PC: EVO 4G-EVO 3D-Acer Iconia A500
Carrier: Sprint
Location: NEW YORK
 
Join Date: Sep 2007
Posts: 835
Reputation: 820
gmfeny knows their stuffgmfeny knows their stuffgmfeny knows their stuffgmfeny knows their stuffgmfeny knows their stuffgmfeny knows their stuffgmfeny knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Reply With Quote
  #5 (permalink)  
Old 01-28-2010, 07:35 PM
itsachirpthing's Avatar
PPCGeeks Regular
Offline
Pocket PC: EVO !
Carrier: Sprint - OMJ
Location: TN
 
Join Date: Sep 2007
Posts: 139
Reputation: 142
itsachirpthing is keeping up the good workitsachirpthing is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Reply With Quote
  #6 (permalink)  
Old 01-28-2010, 07:59 PM
itsachirpthing's Avatar
PPCGeeks Regular
Offline
Pocket PC: EVO !
Carrier: Sprint - OMJ
Location: TN
 
Join Date: Sep 2007
Posts: 139
Reputation: 142
itsachirpthing is keeping up the good workitsachirpthing is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
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.
Reply With Quote
  #7 (permalink)  
Old 01-28-2010, 11:00 PM
mswlogo's Avatar
VIP Member
Offline
Pocket PC: EVO 4G
Carrier: Sprint SERO Premium
Threadstarter
Location: MA, USA
 
Join Date: Jun 2007
Posts: 1,330
Reputation: 970
mswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: iGuidance MortScript to get around TTS not always working

Quote:
Originally Posted by itsachirpthing View Post
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.
Try the new script I attached. I learned that using Kill is bad. So I try to close windows first which is more graceful and makes sure resources are released.

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.
Reply With Quote
  #8 (permalink)  
Old 01-28-2010, 11:12 PM
mswlogo's Avatar
VIP Member
Offline
Pocket PC: EVO 4G
Carrier: Sprint SERO Premium
Threadstarter
Location: MA, USA
 
Join Date: Jun 2007
Posts: 1,330
Reputation: 970
mswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: iGuidance MortScript to get around TTS not always working

Quote:
Originally Posted by itsachirpthing View Post
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.
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).
Reply With Quote
  #9 (permalink)  
Old 01-29-2010, 05:14 PM
mswlogo's Avatar
VIP Member
Offline
Pocket PC: EVO 4G
Carrier: Sprint SERO Premium
Threadstarter
Location: MA, USA
 
Join Date: Jun 2007
Posts: 1,330
Reputation: 970
mswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuffmswlogo knows their stuff
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: iGuidance MortScript to get around TTS not always working

I added V3 of the script that restarts VoiceCommand.
Reply With Quote
This post has been thanked 1 times.
  #10 (permalink)  
Old 01-29-2010, 08:02 PM
itsachirpthing's Avatar
PPCGeeks Regular
Offline
Pocket PC: EVO !
Carrier: Sprint - OMJ
Location: TN
 
Join Date: Sep 2007
Posts: 139
Reputation: 142
itsachirpthing is keeping up the good workitsachirpthing is keeping up the good work
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
I added V3 of the script that restarts VoiceCommand.

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.
Reply With Quote
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 01:24 PM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com