Sign in to follow this  
Followers 0
z0mgItsJohn

Simple Alarm Ideal Works 100%

8 posts in this topic

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

Share this post


Link to post
Share on other sites



#5 ·  Posted (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 by John2006

Latest Projects :- New & Improved TCP Chat

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0