GPS-Sport ForenRun.GPS Wishlist / Ideasbluetooth autoconnect
Bitte einloggen, um neue Kommentare zu erstellen Foren durchsuchen
Erste Seite<Seite1von1>Letzte Seite
ernst.maurer 13.04.2009 13:29:59 UTC



Hi,

Thanks for the idea,
Actually, I use the same method but wrote usual C application for quick work.
But would be better if developers implement this within RunGPS application....
mattone67 09.04.2009 19:00:16 UTC

'Meanwhile' solution

Hi Ernst,
I got a similar problem on my HTC touch dual. To fix it, I installed on my touchphone the Mortscipt v4.11 interpreter with which I've tailored a script (.mscr extentioned) like the following to automatize some recurring operation: turn on bluetooth, 90 degree rotation of the screen, set loudest volume, set brightest backlight, retreiving all orignal setting when finishing.
When I didn't find any reference in the User guide of Mortscript about retreiving current brightness values for the screen, I use same trick accessing directly to the used registry from my OS (WM 6.0). The reason for which I did it was to restore the original display brightness levels when exiting form the script.
Another Mortscript leak of usage is bluetooth switching. Fortunately I find an utility from Teksoft called A2DPToggle giving the capability to switch bluetooth by using different launch parameter values when calling it.
Here is my script.
G.

#-------------------------------------...
#
# RUN.GPS su HTC Dual Touch
# - Accendi Bluetooth.
# - Girare lo schermo di 90° in senso orario.
# - Aumentare al max la luminosità dello schermo.
# - Aumentare al max il volume (togliendo ev. silenzioso).
# - Lancio Run.GPS UV.
# - <ripetere l'elenco in senso inverso>.
#
# Nota: provare ad automatizzare anche per run.gps.
#-------------------------------------...

# Lancia il profilo stereo e accende il bluetooth
Run("\Scheda di memoria\Programmi\Teksoft\A2DPToggle\A2DP.exe","-bluetooth:on")

# Ruota lo schermo di 90° in senso orario
oldScreenPortrait = Screen("portrait")
If(oldScreenPortrait = True)
# Message("Ruoto lo schermo di 90° in senso orario")
Rotate(270)
EndIf

# Accende lo schermo e lo mette alla max luminosità
oldIntensity = RegRead("HKCU", "ControlPanel\BackLight", "Brightness")
oldIntensityAC = RegRead("HKCU", "ControlPanel\BackLight", "ACBrightness")
ToggleDisplay(TRUE)
SetBacklight(100,100)
# Message("Acceso lo schermo al max")

# Accende il volume al max
oldVolume = Volume()
SetVolume(255)
# Message("Aumento il Vol al max")

# run Run.GPS
if(ProcExists("\Scheda di memoria\Programmi\Run.GPS Trainer UV\Run.GPS.TrainerUV.exe") = 0)
Run("\Scheda di memoria\Programmi\Run.GPS Trainer UV\Run.GPS.TrainerUV.exe")
# Message("Run.GPS lanciato")
else
Show("Tranier UV")
# Message("Run.GPS mostrato")
endif

# Attendo 5.000 sec che salga Run.GPS
sleep 5000

# loop/wait for Run.GPS exit
while(ProcExists("\Scheda di memoria\Programmi\Run.GPS Trainer UV\Run.GPS.TrainerUV.exe"))
sleep(1000)
endwhile

# Run.GPS uscito
sleep 1000

# Message("Rimetto il vecchio volume")
SetVolume(oldVolume)

# Message("Rimetto la vecchia intenistà di schermo scollegato/collegato dal PC")
SetBacklight(oldIntensity,oldIntensityAC)

# Message("Rimetto il vecchio orientamento")
If(oldScreenPortrait = True)
# Message("Ruoto lo schermo di 90° in senso orario")
Rotate(0)
EndIf

# Spegne il profilo stereo e spegne il bluetooth
Run("\Scheda di memoria\Programmi\Teksoft\A2DPToggle\A2DP.exe","-bluetooth:off")


ernst.maurer 08.03.2009 00:22:22 UTC



RunGPS connects to bt equipment automatically. that's great. but I need to perform switch on\off bt each time when I start\stop application.
Could you add feature to enable bt automatically at start time, if there is bt equipment in current settings?

Rgds,
Ernst
Erste Seite<Seite1von1>Letzte Seite
© 2024 | Impressum | Allgemeine Geschäftsbedingungen | Nutzungsbedigungen | Datenschutzerklärung | Widerruf und Rücksendung | Batterieentsorgung