Loading....
Recent Article links:

Article

Set AutoProfile on WM6


Set AutoProfile on WM6For quite a long time, I was searching the method of setting the auto profile on my PDA HTC Touch Cruise. My aim was to enable phone to easily change the profile from normal to mute every evening and morning. I had written quite simple mortscript (application needed to be installed on your PDA), which will do that all for you.

This script enables the automatic profile change regarding to day and time. The script is set to change profile to mute everyday from Monday to Friday at 9 p.m., and automatically returns back to normal mode at 5 a.m. (weekend is set: from 9 p.m. to 8:30 a.m.). The whole idea is more than easy. There are 3 files included (AutoProfile.mscr, MuteOn.mscr and MuteOff.mscr).

  1. autoprofile.mscr is script, which define the day and time to change the profile.
  2. muteon.mscr is script, which changes the profile to mute mode.
  3. muteoff.mscr is script, which changes the profile to normal mode.

The best of all is the fact, it only changes the ring tones. That means, I have real and mute ring tones on my storage card, and the scripts copies them to \\windows depending on profile mode. The whole thing is then controlled by PPC ring tones set up.

– AutoProfile.mscr - START ————————————-
Sleep (10000)
Vibrate (500)

GetTime(hour,min,sec,day,month,year)
Den = FormatTime(”w”, TimeStamp())
Hodina = FormatTime(”H”, TimeStamp())

script = SystemPath(”ScriptPath”)\”AutoProfile.mscr”
RemoveNotifications(script)

If (Den >= 0 AND Den <= 4)
If (Hodina >= 5 and Hodina <= 20)
Run(”\Storage Card\My Mortscripts\scripts\MuteOff.mscr”)
RunAt( year, month, day, 21, 0, script )
Exit
Else
Run(”\Storage Card\My Mortscripts\scripts\MuteOn.mscr”)
xYear = FormatTime(”Y”, TimeStamp()+86400)
xMonth = FormatTime(”m”, TimeStamp()+86400)
xDay = FormatTime(”d”, TimeStamp()+86400)
#message (xYear & xMonth & xDay)
RunAt( xYear, xMonth, xDay, 5, 0, script )
Exit
EndIf
Else
If (Hodina >= 5 and Hodina <= 20)
Run(”\Storage Card\My Mortscripts\scripts\MuteOff.mscr”)
RunAt( year, month, day, 21, 0, script )
Exit
Else
Run(”\Storage Card\My Mortscripts\scripts\MuteOn.mscr”)
xYear = FormatTime(”Y”, TimeStamp()+86400)
xMonth = FormatTime(”m”, TimeStamp()+86400)
xDay = FormatTime(”d”, TimeStamp()+86400)
#message (xYear & xMonth & xDay)
RunAt( xYear, xMonth, xDay, 8, 30, script )
Exit
EndIf
EndIf

– AutoProfile.mscr - END ————————————-

– MuteOn.mscr - START ————————————-
#mute
copy “\\Storage Card\\My Ringtones\\MTmute.wav”, “\\Windows\\Rings\\A_ring.wav”, 1
copy “\\Storage Card\\My Ringtones\\MTmute.wav”, “\\Windows\\A_sms.wav”, 1
copy “\\Storage Card\\My Ringtones\\MTmute.wav”, “\\Windows\\A_notify.wav”, 1
RegWriteString(”HKCU”, “\\Software\\tampiss\\”, “Profil”, “Mute”)

– MuteOn.mscr - END —————————————–

– MuteOff.mscr - START ————————————–
#normal
copy “\\Storage Card\\My Ringtones\\MTring.wav”, “\\Windows\\Rings\\A_ring.wav”, 1
copy “\\Storage Card\\My Ringtones\\MTsms.wav”, “\\Windows\\A_sms.wav”, 1
copy “\\Storage Card\\My Ringtones\\MTnotify.wav”, “\\Windows\\A_notify.wav”, 1
RegWriteString(”HKCU”, “\\Software\\tampiss\\”, “Profil”, “Ring”)

– MuteOff.mscr - END —————————————–

I believe, this solution would come handy to many off you.
tampiss

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Comments (No comments)

What do you think?