View Full Version : BT Sound mortscript - tweak?
pkley
13th April 2007, 08:27 AM
I'm no programmer, I thought I'd attempt to tweak it to be a toggle switch but just don't know enough even after reviewing the manual.
What I'd like to see is instead of a Yes No, a toggle - IF it is set to VC then switch to Audio, IF not, then switch to VC.
That way I can either assign it (hopefully) to a button or a faster key sequence.
I know there is also another Mortbutton, but haven't looked into it yet to see if I could perhaps assign it to the PTT press & hold.
senergy
13th April 2007, 10:10 AM
if your talking about the basic BTsound script i posted here
http://forum.xda-developers.com/showthread.php?t=278778&page=4
then this might work, i havent tested it though.
edit: tested it and it works fine.
#basic mortscript to Toggle BT Mono Sound
LaunchApEnable = RegRead ("HKLM","Software\OEM\VoiceCommand","LaunchApEnable")
if (LaunchApEnable=1)
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","LaunchApEnable",0)
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","VoiceCmdDuration",86400)
else
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","LaunchApEnable",1)
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","VoiceCmdDuration",30)
endif
RemE
14th April 2007, 02:47 AM
That's cool, could you add a statement that would briefly show the status with each push like "Bluetooth is now Re-Directed" and "Bluetooth is now Normal".
I'm currently using AE Button to map a key to toggle Bluetooth and WiFi on and off this way. They show a balloon with status for a few seconds. Works great for those times when Bluetooth mysteriously turns off when plugging in the charger occasionally.
Having something like that to re-direct the bluetooth really would be nice.
senergy
14th April 2007, 03:56 AM
how about this one.
not sure how to get rid of the count down though,
i can make it just kill the window in the above script but i think this method is cleaner
#basic mortscript to Toggle BT Mono Sound
LaunchApEnable = RegRead ("HKLM","Software\OEM\VoiceCommand","LaunchApEnable")
if (LaunchApEnable=1)
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","LaunchApEnable",0)
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","VoiceCmdDuration",86400)
#you can change the number after sleepmessage for how long you want it to show
#you can change the text"bluetooth is now..." to anything you want.
sleepmessage 2,Bluetooth is now Re-Directed, BTAudio
else
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","LaunchApEnable",1)
RegWriteDword ("HKLM","Software\OEM\VoiceCommand","VoiceCmdDuration",30)
sleepmessage 2,Bluetooth is now Normal, BTAudio
endif
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.