Here is my MortScript that does work. It is 2 files, and is based on the TREO ALERT script, just pared down a bit.
Code:
################################################## ##
#ALERT.mscr-Gives alert for all to enjoy when messages pending.
#
# check dependencies
If ( NOT FileExists( "\Program Files\MortScript\REMINDER\wav.mscr" ) )
Message ( "Installation of wav.mscr is required! Exiting...", "ALERT script" )
Exit
Else
Message ( "Starting ALERT ...", "ALERT script" )
EndIf
# initialize variables
Notify = FALSE
Volume = FALSE
# start notification check loop
While ( 1 )
# Check the registry for any notifications
Notify = RegValueExists( "HKLM", "System\State\Shell\Notifications\Active", "CLSID" )
# Check the ringer switch on/off
# Volume = 0, means on Vibrate or Mute
Volume = RegRead ("HKCU", "ControlPanel\Volume\","Volume" )
# If notification is pending, then play a wav file
If ( Notify )
If ( Volume )
#play whatever wav file you want
CallScript("\Program Files\MortScript\REMINDER\wav.mscr")
Else
Vibrate ( 500 )
EndIf
EndIf
# wait 120 seconds
Sleep(120000)
EndWhile
################################################## ##
#wav.mscr-Makes noise. i is number of times to play the wav
i = 1
if (i > 0)
PlaySound "\Program Files\MortScript\REMINDER\TPBTVLOW.WAV"
sleep 1000
i = i - 1
endIf