PDA

View Full Version : A2DP automatic connect script


esackbauer
24th August 2007, 10:02 AM
Hi all,

I wrote a little script that reconnects A2DP and starts MortPlayer, because I use my Sony MEX-BT2500 and my Trinity in the car very often. While my old Magician did automatically reconnect A2DP, it would not with my Trinity.

You need MortScript installed.
For english ROMs you need to change "Einstellungen" to "Settings"
Tested on german WM6 Bepe Rom 0.73.


Name the script as e.g. A2DPconnect.mscr:

#Make sure we start at Today screen
#
Show("Desktop")
Sleep 500

#Connect A2DP
#
Run "\windows\ctlpnl.exe" , "cplmain.cpl,23"
WaitForActive("Einstellungen",5)
Sleep 100
#Selecting the BT device XPLOD, so we send the first letter to select
SendKeys("X")
SendContext
#Send Up for selecting last menu item
SendUp
#Send CR for activating as bluetooth headphone
SendCR
Sleep 100
Close("Einstellungen")

#Run Mortplayer
Run "Speicherkarte\Programme\Mortplayer\Mortplayer.exe"

I have assigned this script to hardware button 1, that makes it easy to start or reconnect in the car cradle.

banzro
24th August 2007, 11:36 AM
If you have english you need also to change the latest run command to

#Run Mortplayer
Run "Storage Card\Program Files\Mortplayer\Mortplayer.exe "

or wherever you installed the Mortplayer...

Good luck

Roman

wilsonmui
29th August 2007, 06:50 AM
thx for the script
it was run fine. but my device seems can't start Bluetooth automatically

Run "\windows\ctlpnl.exe" , "cplmain.cpl,23"

is that line is for open bluetooth? will other language rom different?
that a lot

esackbauer
29th August 2007, 09:23 AM
thx for the script
it was run fine. but my device seems can't start Bluetooth automatically

Run "\windows\ctlpnl.exe" , "cplmain.cpl,23"

is that line is for open bluetooth? will other language rom different?
that a lot

Usually this should be language independant. What device do you have and which ROM are you using?

wilsonmui
30th August 2007, 09:22 AM
HK chinese ROM sir!

esackbauer
30th August 2007, 10:09 AM
HK chinese ROM sir!

I am sorry, then this script might not work on your device. I have no chance to test it on a chinese ROM.