|
02/15/2007, 11:47 PM
#278
 Originally Posted by slingbox
add it to a user interface like power manager view
very very easy with different chime choices
Choice "Power","(((Hourly Chime)))","EVERY HOUR","EVERY 2 HOURS","","CHIME SOUND","SLEEP"
Case 1
#
# HourlyChime.mscr - Plays the wav file of your choice on the hour between the times you specify.
#
# Rev 0 , Initial Release 15-Feb-2007
# Tested with MortScript RC8
#
# scottymomo at gmail dot com
#
# initialize variables
CurrentHour = 0
CurrentMinute = 0
CurrentSecond = 0
CurrentDay = 0
CurrentMonth = 0
CurrentYear = 0
#Set the start hour and the end hour for the chimes using 24 hour time.
#Modify these values if you want different starting or ending times
StartChiming = 8
EndChiming = 20
#Figure out what year, month, and day it is
GetTime ( CurrentHour, CurrentMinute, CurrentSecond, CurrentDay, CurrentMonth, CurrentYear )
#The chime time will be at the top of the hour on the next hour
ChimeTime = CurrentHour+1
#Set the Notification Queue Item for the next hour if the time is between the start and end times
If ((ChimeTime >= StartChiming) AND (ChimeTime <= EndChiming))
RunAt( CurrentYear, CurrentMonth, CurrentDay, ChimeTime, 0, "\Program Files\MortScript\PlaySound.mscr" )
EndIf
# Set the script to rerun 5 minutes before the top of the hour in order to set the next chime
RunAt( CurrentYear, CurrentMonth, CurrentDay, ChimeTime, 55, "\Program Files\MortScript\HourlyChime.mscr" )
Supplemental script
%i% = 10
if expression %i% > 1
PlaySound "\Program Files\MortScript\Chime-Alerts\YOUR CHIME IS EVERY HOURE.wav"
sleep 0
%i% = %i% -1
endIf
Case 2
Case 3
Case 4
Add different variation of script in each case
Scotty Im not goint to write off your outstanding script just throwing you an idea with major props on your work.....once again great script my friend
No worries
Might need to look at your example for how to do this as my "coding" powers only go so far
|
|
|