z0mgItsJohn Posted February 9, 2008 Posted February 9, 2008 Hello AutoIt Peoples.. I Came Out With A Really Easy Way To Make Alarms.. (Source) ~Really Simple~ #Include <Date.au3> Global $Alarm_Hour = ('') ; Set Alarm Hour Global $Alarm_Minute = ('') ; Set Alarm Minute Global $Alarm_Second = ('00') ; Default Alarm Second '00' Global $Time_Of_Day = ('') ; Set PM Or AM Global $Alarm_Time = ($Alarm_Hour & ':' & $Alarm_Minute & ':' & $Alarm_Second & ' ' & $Time_Of_Day) MsgBox (0, "Alarm Time" , $Alarm_Time ,0) Do Global $Current_Time = _NowTime () Until $Current_Time = $Alarm_Time MsgBox (0, "Alarm" , "Wake Up.. Current Time : " & $Current_Time ,0) Please Feel Free To Post Comments.. Questions Etc... Latest Projects :- New & Improved TCP Chat
z0mgItsJohn Posted February 9, 2008 Author Posted February 9, 2008 Hmm Dose Any One Have Any Ideal How To Make It Use Less CPU :3 Latest Projects :- New & Improved TCP Chat
JustinReno Posted February 9, 2008 Posted February 9, 2008 In the do loop: Do Sleep(100) Global $Current_Time = _NowTime () Until $Current_Time = $Alarm_Time
z0mgItsJohn Posted February 9, 2008 Author Posted February 9, 2008 Thanks Justin So.. Do You Thank My Script Is A Good Ideal? Latest Projects :- New & Improved TCP Chat
z0mgItsJohn Posted February 9, 2008 Author Posted February 9, 2008 (edited) Edited Script Now Uses 0% - 1% CPU Thanks To JustinReno (Source) #Include <Date.au3> Global $Alarm_Hour = ('5') ; Set Alarm Hour Global $Alarm_Minute = ('2') ; Set Alarm Minute Global $Alarm_Second = ('00') ; Default Alarm Second '00' Global $Time_Of_Day = ('PM') ; Set PM Or AM Global $Alarm_Time = ($Alarm_Hour & ':' & $Alarm_Minute & ':' & $Alarm_Second & ' ' & $Time_Of_Day) MsgBox (0, "Alarm Time" , $Alarm_Time ,0) Do Sleep (100) Global $Current_Time = _NowTime () Until $Current_Time = $Alarm_Time MsgBox (0, "Alarm" , "Wake Up.. Current Time : " & $Current_Time ,0) Edited February 9, 2008 by John2006 Latest Projects :- New & Improved TCP Chat
JustinReno Posted February 9, 2008 Posted February 9, 2008 You welcome! Nice script, I like its simplicity. I think it would be cool if you could add a GUI to make things more friendlier.
crzftx Posted February 10, 2008 Posted February 10, 2008 Nah, a GUI would take away the simplicity. It's a good, simple script as is. I don't like to use UDFs, so I modded it. Global $hour = 16, $min = 45 Do Sleep (100) Until @Hour = $hour And @Min = $min MsgBox(0,"Alarm" ,"Wake Up.. Current Time : " & @Hour & ":" & @Min & ":" & @Sec ,0)
muhmuuh Posted February 10, 2008 Posted February 10, 2008 Hi! I've written a similar script but the messagebox only doesn't wake me up so I use SoundPlay(<very.loud.song>) instead of the msgbox I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now