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.
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.
Code:
#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
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.
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
Code:
#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
Related
Quick and dirty;
i hated starting ActSync, -> tools -> Options -> Options -> uncheck 'When craddled' Eneble PC sync '...'
Everytime i had to change is, or Tomtom would not work, and i would see a Qtec trying to sync with my car !
So i made a quick, and not so dirty mortscript/mortrunner batch :
This is for the MDA 2/XDA2/Qtec 2020
Cut here
---8<-------------------------------------------------
Code:
Errorlevel Syntax
If regKeyEqualsDWord HKCU, ControlPanel\Comm, AutoCnct, 5
if question AutoActiveSync is On. Switch Off ?, ActiveSync when cradled
RegWriteDWord HKCU, ControlPanel\Comm, AutoCnct, 0
Else
Exit
Endif
Else
if question AutoActiveSync is Off. Switch On ?, ActiveSync when cradled
RegWriteDWord HKCU, ControlPanel\Comm, AutoCnct, 1
Else
Exit
Endif
---8<-------------------------------------------------
Save as toggleASync.mortrun or toggleASync.mscr and sitck it somewhere on the qtec and create a shortcut to it, install Mortrunner/Mortscript and assign a HW button to the shortcut, or add it to a Today launcher
Did the same for switching BT + profile on off..
Please test, since it don't work on my Qtec, i have BTTools installed
---8<-------------------------------------------------
Code:
Errorlevel Syntax
If regKeyExists HKCU, Software\PBT, PreferredAudioDevice
Message "BTTools is installed, Use it's TodayPlugin instead!", ToggleBT
Exit
Endif
If regKeyEqualsDWord HKCU, Software\Microsoft\Bluetooth\Settings, ScanMode, 1
if question Bluetooth is On. Switch Off ?, ToggleBT
RegWriteDWord HKCU, Software\Microsoft\Bluetooth\Settings, ScanMode, 0
RegWriteDWord HKCU, Software\HTC\BTProfile, On, 0
Else
Exit
Endif
Else
if question Bluetooth is Off. Switch On ?, ToggleBT
RegWriteDWord HKCU, Software\Microsoft\Bluetooth\Settings, ScanMode, 5
RegWriteDWord HKCU, Software\HTC\BTProfile, On, 1
Else
Exit
Endif
exit
---8<-------------------------------------------------
Save as ToggleBT.mscr or .mortrunner etc....
Hay guys and gals...
I have a question, regarding the PDA sound of the Wizard(so not the phone sound) it's the left bar on your volume shortcut...
I imagine this is a question which is on a lot of TomTom 6 users by now...
Is there a way, to increase this sound automatically only when a certain program is active, and to decrease it to standard when the program is terminated?
Tomtom 5.21 used to take over this slider, and the sound would be loud enough...after tt5.21 terminated, it would return to it's original value.
Now in TT6, the sound is related to the pda sound bar....so it's either turn up your PDA volume for all time(which I don't want to do, because all the sounds are so loud then...) or choose to not hear the voices of TomTom6 when you drive, even with the TomTom volume turned to 100%...
Hope someone has the solution for me...pretty please
Greetings!!!
maybe Mortscript???HELP PLEASE!!!
maybe Mortscript can do this for me?
But unfotunately I have no idea what strings I should use..
Could someone help me create a .mscr file to launch TOMTOM with max volume and to restore volume te previous, or set value after TOMTOM exit?
Prettyplease with cherry's on top???
got going...
Okay..
I got this far with mortscript:
run (aplication)
setvolume 255
This string turns up the volume all the way when you run the app.
Now only, I want it to go back to a preset value when I exit the program..
I tried:
Run (application)
While procexists (aplication.exe)
Setvolume 255
endwhile
Setvolume 70
But this imediately sets the volume to value 70...
even tried it with sleep 10000 between the run and the while, to make sure the app was running, no luck
Anyone gotten an idea???
No idea??
Is there no one with an idea on this???
Turning volume up is no problem, turnig it down again after closing app is what I can't seem to manage....
Maybe there's a program which does this???
:?: :roll: :?:
ANYONE????
Got the answer from Mort himself::::
Here's the solution...worked for me!!
Needs mortscript and a text editor(notepad)
My question to him on his support forum:
Haia...
I'm looking for a way to turn up the PDA volume during a program, and turn it down after the program terminates...
I tries to do this with Mortscript, using
run (aplication)
while (aplication)
setvolume 255
endwhile
setvolume 80
Even tried it with a sleep before the while...to ensure the app is up and running
This script however doesn't turn the volume up, but goes directly to volume 80...
The ap is Tomtom 6...the volume is now coupled on your PDA volume, so I have either very loud PDA sounds, or a very silent TomTom voice...this bugs me...
Is there a way to turn up the volume during the aplication, and turn it down again automatically after app exits.
Turning the volume up before the app starts is of course no problem using mortscript....but the turning it down after app ends is what's keeping me awake at night...
Hope someone has the answer....
Thu Sep 07, 2006 9:32 am
Morts reply:
Probably the window name in "While wndExists ..." is wrong. Try to get it with GetActiveWindow and Message, and be sure to use correct upper/lower case (i.e. "Tomtom" won't find "TomTom"!).
Another way might be to use RunWait, i.e.
SetVolume 255
RunWait \...\tomtom.exe
SetVolume 80
This wouldn't reset the volume all the time, but also won't require as much CPU time. If you prefer the while loop (or RunWait doesn't work with TomTom), you should add a Sleep in the loop, so the check and volume change doesn't happen all the time. Sleep is far more CPU friendly.
Tutorial....
Okay, here goes....
Firstly download and install Mortscript, to be found at:
http://www.sto-helit.de/modules/edito/content.php?id=38
Then put the file attached to this post on your device..
Very important :!: :!: to change the extension of the file from .txt to .mscr :!: :!:
For some reason .mscr extensions are not allowed on this forum.
You can put the file anywhere you like...
Then click it to make TomTom run, The script will be executed and TomTom will start automatically..
If you find the sound too loud, take a text editor, open the file and change the value at Setvolume 255 to something less...
Same with the return sound..If you find that to much or to less, change the value at Setvolume 90...
You just have to tweak those two to your own desired volumes.
For people with devices in different languages, you should open the file with a text editor and change the value of \Program Files\Navigator\ to the value where you've gotten TomTom installed...
Good luck!!!
Works great, thanks!!
Now I have just put this script file in my "\Windows\Start Menu" folder and use this to launch TT6.
Fantastic.
BTW, 60 is the first "notch" of volume, which is where I normally have my phone.
Can anyone test the backlight function? I want to see if i can solve the iguidance problem of the battery light going off. this is what i have sucessfully working:
SetBacklight External 100, Battery 100
just found out about mortscript recently. very nice. found this thread doing some searches for solutions to my ttn6 problems. here's the script i use which gets the current volume first before setting to max.
# ace_ttn_start.mscr
# launch tomtom and keep active, set volume to max
# initialize values
ErrorLevel("syntax")
ttn_exe = "\Program Files\Navigator\TomTom Navigator.exe"
ttn_ttl = "TomTom Navigator"
intrval = 2000
# turn off connection established notification
mem_conn = RegRead("HKCU","ControlPanel\Notifications\{8ddf46e7-56ed-4750-9e58-afc6ce486d03}","options")
RegWriteDWord("HKCU","ControlPanel\Notifications\{8ddf46e7-56ed-4750-9e58-afc6ce486d03}","options",0)
# adjust volume
mem_vol = RegRead("HKCU","ControlPanel\Volume","Volume") * 255 / 4294967295
SetVolume(255)
# launch tomtom
Run(ttn_exe)
WaitFor(ttn_ttl, 30)
# keep tomtom active
While(WndExists(ttn_ttl))
If (NOT WndActive(ttn_ttl))
Show(ttn_ttl)
EndIf
Sleep(intrval)
EndWhile
# replace changed values
RegWriteDWord("HKCU","ControlPanel\Notifications\{8ddf46e7-56ed-4750-9e58-afc6ce486d03}","options",mem_conn)
SetVolume(mem_vol)
Click to expand...
Click to collapse
Saw the post before, couldnt relocate it.
How do I make it so when using WMP or HTC Audio Manager, when I press the power button the audio keep playing?
Here's what I'm trying to do.
I have the Jabra BT8010 (which I love btw) and I would like to use my phone at the gym to listen to music. The blue blinking Bluetooth indicator remains flashing when I press the power button to shut off the screen, so I know my headset is still joined, but the music stops playing. When I press the power button to turn the screen back on, the music resumes.
-Randy
dont press the off button
asign a button to toggle screen it will turn off the screen
it's the only thing which can be turned off while the pda
is still on enough to play music
I'm using dcd rom 2.1.0 and audio manager 1.02 build 614.712
My audio continues to play after pressing the power button.
rtownsend said:
I'm using dcd rom 2.1.0 and audio manager 1.02 build 614.712
My audio continues to play after pressing the power button.
Click to expand...
Click to collapse
Can you do me a favor? Use whatever registry editor you like, navigate to [HKLM\System\CurrentControlSet\Control\Power\State\ScreenOff]
There are 4 values in there:
blk1:
Default
Flags
upt1:
Can you tell me what the value is set to for each of the 4 items?
TIA! -Randy
Try putting the audio manager to REPEAT. This works for me...with repeat off the music stops when I power down the screen, but with repeat on the music continues right on through.
Here you go
default = 0
bkl1 = 4
flags = 1048576
upt1 = 1
rtownsend said:
Here you go
default = 0
bkl1 = 4
flags = 1048576
upt1 = 1
Click to expand...
Click to collapse
Okay... next step in the sequence lol.
How about the values in [HKLM\System\CurrentControlSet\Control\Power\State\Unattended]
blk:
Default
Flags
upt:
wav1:
That should be the last thing I need, I promise
default = 0
bkl1 = 4
flags = 4194304
gpd0 = 4
upt1 = 1
wav1 = 4
rtownsend said:
default = 0
bkl1 = 4
flags = 4194304
gpd0 = 4
upt1 = 1
wav1 = 4
Click to expand...
Click to collapse
whelp... mine doesn't have the gpd0 value, and my wav1 is set to 0 like colonel said to do. Sometimes it works, sometimes it doesn't. there doesn't seem to be a pattern to it. it has a mind of it's own. I've decided that I'm just gonna wait for the new ROM to be released by Verizon before I worry about problems that would effect my everyday usage of the phone. Thanks for the help though.
HTC Audio Manager has always worked for me with power button off, and here is the fix for WMP as found on ppcgeeks
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State\Unattended]
"WAV1:"=dword:00000000
Okay, I need a ppc genius to explain this one to me! This is very weird. I've been doing some troubleshooting here...
If I do a soft reset, music will NOT play after pressing the power button, even with the above mentioned reg fix.
However, if I connect and disconnect the phone from my computer and Activesync starts, and is closed (completely closed on the phone through QMenu) music WILL play after pressing the power button.
It also plays if I manually open ActiveSync on the phone, and then close it. It does NOT work while ActiveSync is running for the first time after a soft reset, but if I open ActiveSync any number of times after it's been opened and closed once, music DOES play after pressing the power button.
Weird... This is killing me, I need an explanation!!!
(PS - I hope this thread is getting considerable attention and views. I cannot be the only one with this problem lol)
Not a problem for me
I am on the 3.16 leak but even with 2.17 I was able to play music with screen off. With or without S2U2 using the power settings. The screen sleeps the music goes on. I can turn it on again change songs and then hit the power button and the screen goes back to sleep music still playing.
This seems to be the general consensus, but not in my case, and I'm sure a few others.
Like I said, after a soft reset I can only get it to work properly with what I described about ActiveSync. Weird, can't figure it out...
I was having this exact same issue. I changed the wav1 value to 0 it worked right away. Didn't even need to soft reset.
shawn_ said:
I was having this exact same issue. I changed the wav1 value to 0 it worked right away. Didn't even need to soft reset.
Click to expand...
Click to collapse
Yep. That was it. Thanks!
Okay guys after hours and hours of searching and messing with my registry I found a SOLUTION for HTC Audio Manager to stay on after pressing the power button to turn off the screen/suspend........
It is sooooo simple I'm just shaking my head, no more using psshutxp or other screen toggles.
It keeps playing...yayyyyy
First open Reg editor and go to HKLM\Software\HTC\AudioManager\Config
Now create a new "DWord value" name it DisableSuspend and give it a value of 1
(You can also change the value of "enter suspend" to 0 but with my new key it should change it on reboot anyways)
This was done on a Sprint Touch
Double post
i changed the wav1 to 0 on my mogul and it worked fine, then i soft reset and its not working anymore. The value is still 0 as thats what regedit shows
primenall said:
Okay guys after hours and hours of searching and messing with my registry I found a SOLUTION for HTC Audio Manager to stay on after pressing the power button to turn off the screen/suspend........
It is sooooo simple I'm just shaking my head, no more using psshutxp or other screen toggles.
It keeps playing...yayyyyy
First open Reg editor and go to HKLM\Software\HTC\AudioManager\Config
Now create a new "DWord value" name it DisableSuspend and give it a value of 1
(You can also change the value of "enter suspend" to 0 but with my new key it should change it on reboot anyways)
This was done on a Sprint Touch
Click to expand...
Click to collapse
Don't working at HTC Polaris.
im just using slide 2 unlock and slide 2 play... LOVE EM...
play music and can shutoff without modifying registry...
MortScript command for WaitFor"In"active? (for hiding & showing today bars)
So vjtottletodayIIalpha can hide the task bar, but since we use the task bar quite often so this is my idea:
A mort script that can execute the vjtoggle program when today shows up, and kill the program when the screen is occupied by other programs.
Can this be done? Any help? Please~~~?
Sorry for my bad english, I'll try to make it clearer:
Ok, so this probably doesn't sound very interesting for most people, but last night I did some digging and finally figured something out and it feels good.
But I STILL NEED HELP!
Anyone can tell me if there's a command that can achieve something like WaitForActive("AnyProgramButDesktop",-1) ?
I would really appreciate it!!!!!
The below script is what I have so far:
RegWriteDWord ( "HKLM", "Software\VJTodayToggle\", "SoftKeySize",26 )
RegWriteDWord ( "HKLM", "Software\VJTodayToggle\", "StartSize",26 )
Run ( "\Program Files\vjtoggletodayiialpha.exe" )
Sleep( 2000 )
If ( wndActive( "Desktop" ) )
RegWriteDWord ( "HKLM", "Software\VJTodayToggle\", "SoftKeySize",0 )
RegWriteDWord ( "HKLM", "Software\VJTodayToggle\", "StartSize",0 )
Run ( "\Program Files\vjtoggletodayiialpha.exe" )
Else
WaitForActive("Desktop",-1)
RegWriteDWord ( "HKLM", "Software\VJTodayToggle\", "SoftKeySize",0 )
RegWriteDWord ( "HKLM", "Software\VJTodayToggle\", "StartSize",0 )
Run ( "\Program Files\vjtoggletodayiialpha.exe" )
EndIf
Click to expand...
Click to collapse
Im actually lost about what your trying to achieve?
vijays toggletodayIIalpha just hides your soft button taskbar on the today screen. It comes back up in any other screen/program you launch.
Actually the program hides top & buttom bars, but when in other program only the buttom bar comes back, not the top bar. So what I wanna do is to make a script that detects whether the screen in occupied(active) by desktop/other apps, and hide/show the bars. Is it more obvious now? Sorry for my bad English
Hi All,
I have installed treovibe mortscript from http://discussion.treocentral.com/wm-developers-mortscript/138234-mortscript-treovibe-2.html
to change continuous vibration to something cool
It works for me OK, but i have one problem with that script:
i have very annoying vibration during call (when an SMS arrives or I have another incoming call or any other notification)
treovibe use something like this to enable vibration:
x = RegRead( "HKLM", "System\State\Phone", "Status" )
If (x AND 65536)
If ((VibrateStyle=1) or (VibrateStyle=2) or (VibrateStyle=3))
Vibrate(VibrateShort)
Else
Vibrate(VibrateLong)
EndIf
EndIf
Sleep(100)
I thought that if it can read another regkey which will inform the script if there is an active call it can turn off vibration.
Could someone help me with that?
This should go into Q&A section btw
The Reg key you are looking for is
HKLM\System\State\Phone\active call count
if this reg key exists there is an active call
thanks for info about reg key..
Now i would be very grateful if somebody help with modifying this treovibe script..