Jump to content
Sign in to follow this  
z0mgItsJohn

Auto Alarm v1.0

Recommended Posts

z0mgItsJohn

Hello AutoIt Peoples.. I Have Came Out With A New Program.. Called Auto Alarm v1.0.. Its An Alarm Clock With A Place Where

You Can Set What It Dose When It Gos Off :) Well.. Here Ya Go! :)

Source

#Include <GUIConstants.au3>
#Include <Date.au3>
#NoTrayIcon
Opt ('GUIOnEventMode',1)

If FileExists (@ScriptDir & "\Command.au3") Then 
FileDelete (@ScriptDir & "\Command.au3")
EndIf 

GUICreate (" Auto Alarm v1.0 - By John O.", 275,300)
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit')
GUICtrlCreateGroup ("", 10,5,255,50)
$Input_Hour = GUICtrlCreateInput ("12", 22,22,50,20)
GUICtrlCreateLabel (":", 75,25)
$Input_Minute = GUICtrlCreateInput ("00", 82,22,50,20)
GUICtrlCreateLabel (":", 135,25)
$Input_Second = GUICtrlCreateInput ("00", 142,22,50,20)
$Time_Of_Day = GUICtrlCreateCombo (" AM", 202,22,50,50)
GUICtrlSetData (-1, " PM")
GUICtrlCreateGroup ("", 10,90,255,160)
$Command = GUICtrlCreateEdit ("", 22,108,231,130)
GUISetFont ("13","","","Arial")
GUICtrlCreateLabel ("AutoIt Command", 70,66)
$Start_Alarm = GUICtrlCreateButton ("Start Alarm", 10,258,90,35)
GUICtrlSetOnEvent ($Start_Alarm, "_Get_Alarm_Time")
$Test_Command = GUICtrlCreateButton ("Test Command", 144,258,122,35)
GUICtrlSetOnEvent ($Test_Command, "_Test_Command")
GUISetState (@SW_SHOW)

While 1
Sleep (250)
WEnd

Func _Get_Alarm_Time ()
WinSetState (" Auto Alarm v1.0", "", @SW_HIDE)
FileDelete (@ScriptDir & "\Command.au3")
FileWrite ("Command.au3", GUICtrlRead ($Command))
Global $Alarm_Time = (GUICtrlRead ($Input_Hour) & ':' & GUICtrlRead ($Input_Minute) & ':' & GUICtrlRead ($Input_Second) & GUICtrlRead ($Time_Of_Day))
Call ("_Start_Alarm")
EndFunc

Func _Start_Alarm ()
Do
Sleep (150)
Global $Current_Time = _NowTime ()
Until $Current_Time = $Alarm_Time
Run ('"' & @AutoItExe & '" /AutoIt3ExecuteScript "'& @ScriptDir &'\Command.au3"')
Call ("_Exit")
EndFunc

Func _Test_Command ()
FileWrite ("Command.au3", GUICtrlRead ($Command))
Run ('"' & @AutoItExe & '" /AutoIt3ExecuteScript "'& @ScriptDir &'\Command.au3"')
EndFunc

Func _Exit ()
FileDelete (@ScriptDir & "\Command.au3")
Exit
EndFunc

Screen Shot

Posted Image

Please Feel Free To Post Ideals.. Comments Bug Reports Etc.. :)

~Enjoy~

Auto_Alarm_v1.0.zip

Edited by John2006

Latest Projects :- New & Improved TCP Chat

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.