/*
Gamers alarm clock - Target Dec08
Alarm clock functionality for gamers.
Alarms denoted by stuttering mute status - 'audible' during game play and doesn't interupt anything
alarm times read from ini file (GAC.INI)
all times in 24hour clock (format H:mm - note no leading zeros on the hour)
multiple alarms can be set by separating times with a comma
traytip display of alarm times on mouseover tray icon
alarm times can be set from tray menu or hotkey (or edit the INI file manually)
HOTKEYS
WIN+F8 - Reload
WIN+F9 - edit alarms
WIN+F10 - Quit
WIN+F11 - snooze (10 minutes)
WIN+RMouseButton - snooze (10 minutes) - for FPS
WIN+F12 - stop alarm
*/
fileinstall,GAC.ico,GAC.ico,0
#singleinstance
#persistent
sendmode InputThenPlay
menu,tray,icon,GAC.ico
menu,tray,nostandard
menu,tray,add,EditINI
menu,tray,add
menu,tray,add,About
ifnotexist,GAC.INI
{
iniwrite,12:00,GAC.ini,alarms,times
}
iniread, alarm,GAC.INI,alarms,times
menu,tray,tip,Alarms:%alarm%`n`nHOTKEYS`n#F9 - Edit alarms`n#F10 - quit`n#F11 - Snooze (10Mins)`n#F12 - stop alarm
loop
{
formattime,TChk,%a_now%,H:mm
loop,parse,alarm,csv
{
if a_loopfield = %TChk%
{
loop
{
if Brake
{
Brake:=
soundset,0,master,mute
sleep,60000
break
}
soundset,1,master,mute
sleep, 200 ;125
soundset,0,master,mute
sleep, 800 ;700
}
}
}
sleep, 15000
}
#f8::reload
#F9::gosub EditINI
#F10::exitapp
#RButton::
#f11::
soundset,off,master,mute
sleep, 600000
return
#F12::
Brake:=1
return
EditINI:
gui,add,edit,r1 vtmp1 gupdt,%alarm%
gui,add,button,default w50 gSave, Submit
gui, add, button,x65 y33 w50 gFormClose,Exit
gui, -sysmenu -caption +border
gui,show, autosize center
return
updt:
gui,submit,nohide
return
save:
iniwrite,%tmp1%,GAC.ini,alarms,times
gui, destroy
splashtexton,,,Alarms Updated
sleep,2500
splashtextoff
reload
return
FormClose:
guiescape:
closeform:
ifwinexist, GAC - About
{
gui, destroy
return
}
tmp1:= alarms
iniwrite,%tmp1%,GAC.ini,alarms,times
gui, destroy
return
About:
Gui, add, text, ,Gamers Alarm Clock `(NANY Clock`) is a simple alarm tool `n`nAlarms denoted by toggling the mute status on and off - 'audible' during game play and doesn't interupt anything `n`nAlarm times read from ini file (GAC.INI) `n`nAll times in 24hour clock (format H:mm - note no leading zeros on the hour) `n`nMultiple alarms can be set by separating times with a comma `n`ntraytip display of alarm times on mouseover tray icon `n`nalarm times can be set from tray menu or hotkey (or edit the INI file manually) `n`nHOTKEYS `n`nWIN+F8 - Reload `n`nWIN+F9 - edit alarms `n`nWIN+F10 - Quit `n`nWIN+F11 - snooze `(10 minutes`) `n`nWIN+RMouseButton - snooze (10 minutes) - for FPS `n`nWIN+F12 - stop alarm
gui, show, ,GAC - About
return