z0mgItsJohn Posted January 31, 2008 Share Posted January 31, 2008 (edited) Hello AutoIt People.. I Came Out With A New Program... About Auto Timer v1.0... Well Its A Program Where You Set The Amount Of Hours / Mins / Secs You Want The Program To Sleep... When The Program Is Done It Will Run The AutoIt Commands You Wrote .. The Program Has A Place To Type In Commands... Well.. I Gtg ~~ expandcollapse popup#Include <GuiConstants.au3> Opt('GUIOnEventMode',1) #NoTrayIcon FileDelete ( "Command.au3" ) Global $Second = ('1000') Global $Minute = ('60000') Global $Hour = ('3600000') Global $Title = ('Auto Time v1.0 - By John O.') Local $Hour_ = 0 Local $Minute_ = 0 Local $Second_ = 0 GUICreate($Title , 350, 420) GUISetOnEvent($GUI_EVENT_CLOSE , '_Exit') $Input_Hour = GUICtrlCreateInput ( "" ,35,50,75) $Input_Minute = GUICtrlCreateInput ( "" ,135,50,75) $Input_Second = GUICtrlCreateInput ( "" ,235,50,75) $Command = GUICtrlCreateEdit ( "" , 4,150,343,200) GUISetFont (13,"","","Comic Sans MS") GUICtrlCreateLabel ( "Hour" ,50,18) GUICtrlCreateLabel ( "Minute" ,144,18) GUICtrlCreateLabel ( "Second" ,243,18) GUICtrlCreateLabel ( "------------------------------------------------" ,6,95) GUICtrlCreateLabel ( "Input - Command" ,100,115) GUICtrlCreateLabel ( "------------------------------------------------" ,6,350) GUICtrlCreateButton ( "Continue" ,130,375) GUICtrlSetOnEvent (-1, "_Continue" ) GUISetState (@SW_SHOW) While 1 Sleep (500) WEnd Func _Continue () WinSetState ($Title , "", @SW_HIDE) FileDelete ('Command.au3') FileWrite ('Command.au3', GUICtrlRead ($Command) ) Call ('_Set_Sleep_Second') EndFunc Func _Set_Sleep_Second () For $Array_Second = '1' To '100' If GUICtrlRead ($Input_Second) = $Array_Second Then Global $Second_ = GUICtrlRead ($Input_Second) * $Second EndIf Next Call ('_Set_Sleep_Minute') EndFunc Func _Set_Sleep_Minute () For $Array_Minute = '1' To '100' If GUICtrlRead ($Input_Minute) = $Array_Minute Then Global $Minute_ = GUICtrlRead ($Input_Minute) * $Minute EndIf Next Call ('_Set_Sleep_Hour') EndFunc Func _Set_Sleep_Hour () For $Array_Hour = '1' To '100' If GUICtrlRead ($Input_Hour) = $Array_Hour Then Global $Hour_ = GUICtrlRead ($Input_Hour) * $Hour EndIf Next Call ('_Sleep') EndFunc Func _Sleep () $Set_Sleep = $Second_ + $Minute_ + $Hour_ Sleep ($Set_Sleep) Call ('_Command') EndFunc Func _Command () Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "'& @ScriptDir &'\Command.au3"') Exit EndFunc Func _Exit () Exit EndFunc Some Credits Goto Senton-Bomb But Mostly To Me Comments.. Bug Reports Ect.. Please Post Enjoy ~~ Edited January 31, 2008 by John2006 Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
BillLuvsU Posted January 31, 2008 Share Posted January 31, 2008 lol, it is the arch enemy of alarm.au3!!!! :ninja: [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
NELyon Posted January 31, 2008 Share Posted January 31, 2008 All Credits Goto Me..I helped with the /Autoit3ExecuteScript Nice job though Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted January 31, 2008 Author Share Posted January 31, 2008 I helped with the /Autoit3ExecuteScript Nice job though O Yea I'm Sorry! Thanks For That .. Some Credits Goto Senton-Bomb! The Execute Script Part Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted January 31, 2008 Author Share Posted January 31, 2008 Fear You Play COD4 Me Too My Name Is John IN COD4 I Are Rank 55 All Attachments And Perks Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
BillLuvsU Posted January 31, 2008 Share Posted January 31, 2008 I are rank 24, and I want the bereetta but don't play ir enough because halo 3 is so much better. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted January 31, 2008 Author Share Posted January 31, 2008 I Don't Got Halo 3 :3 I Wish I Did Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted January 31, 2008 Author Share Posted January 31, 2008 Max Amount Of Hours Secs Mins = 100 If You Want More O.o Just Change The Arrays From "1 to 100" To "1 to 1000" Or More lol Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
BillLuvsU Posted January 31, 2008 Share Posted January 31, 2008 [/offtopic] [ontopic] A small suggestion, use the time functions to get the current time, then add the timer time to the current time to get the alarm time, then wait for the alarm time and set off the alarm then. =]]]]]] that would be a slightly cleaner way to do it and remove the whole restriction all together. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
Uriziel01 Posted January 31, 2008 Share Posted January 31, 2008 Nice but i think it shoud have an button for test you command before starting the clock and option of entering normal time not "time to" i mean 23:47:00 . Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted January 31, 2008 Author Share Posted January 31, 2008 100 Hours Is An Restriction o.o Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted January 31, 2008 Author Share Posted January 31, 2008 (edited) New Copy With Test Command Button And Exit Button ! expandcollapse popup#Include <GuiConstants.au3> Opt('GUIOnEventMode',1) #NoTrayIcon FileDelete ( "Command.au3" ) Global $Second = ('1000') Global $Minute = ('60000') Global $Hour = ('3600000') Global $Title = ('Auto Time v1.0 - By John O.') Local $Hour_ = 0 Local $Minute_ = 0 Local $Second_ = 0 GUICreate($Title , 350, 420) GUISetOnEvent($GUI_EVENT_CLOSE , '_Exit') $Input_Hour = GUICtrlCreateInput ( "" ,35,50,75) $Input_Minute = GUICtrlCreateInput ( "" ,135,50,75) $Input_Second = GUICtrlCreateInput ( "" ,235,50,75) $Command = GUICtrlCreateEdit ( "" , 4,150,343,200) GUISetFont (13,"","","Comic Sans MS") GUICtrlCreateLabel ( "Hour" ,50,18) GUICtrlCreateLabel ( "Minute" ,144,18) GUICtrlCreateLabel ( "Second" ,243,18) GUICtrlCreateLabel ( "------------------------------------------------" ,6,95) GUICtrlCreateLabel ( "Input - Command" ,100,115) GUICtrlCreateLabel ( "------------------------------------------------" ,6,350) GUICtrlCreateButton ( "Continue" ,5,375) GUICtrlSetOnEvent (-1, "_Continue" ) GUICtrlCreateButton ( "Test Command" ,217,375) GUICtrlSetOnEvent (-1, "_Test_Command" ) GUICtrlCreateButton ( " Exit " ,115,375) GUICtrlSetOnEvent (-1, "_Exit" ) GUISetState (@SW_SHOW) While 1 Sleep (500) WEnd Func _Continue () WinSetState ($Title , "", @SW_HIDE) FileDelete ('Command.au3') FileWrite ('Command.au3', GUICtrlRead ($Command) ) Call ('_Set_Sleep_Second') EndFunc Func _Test_Command () FileWrite ('Command.au3', GUICtrlRead ($Command) ) Sleep (500) Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "'& @ScriptDir &'\Command.au3"') EndFunc Func _Set_Sleep_Second () For $Array_Second = '1' To '100' If GUICtrlRead ($Input_Second) = $Array_Second Then Global $Second_ = GUICtrlRead ($Input_Second) * $Second EndIf Next Call ('_Set_Sleep_Minute') EndFunc Func _Set_Sleep_Minute () For $Array_Minute = '1' To '100' If GUICtrlRead ($Input_Minute) = $Array_Minute Then Global $Minute_ = GUICtrlRead ($Input_Minute) * $Minute EndIf Next Call ('_Set_Sleep_Hour') EndFunc Func _Set_Sleep_Hour () For $Array_Hour = '1' To '100' If GUICtrlRead ($Input_Hour) = $Array_Hour Then Global $Hour_ = GUICtrlRead ($Input_Hour) * $Hour EndIf Next Call ('_Sleep') EndFunc Func _Sleep () $Set_Sleep = $Second_ + $Minute_ + $Hour_ Sleep ($Set_Sleep) Call ('_Command') EndFunc Func _Command () Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "'& @ScriptDir &'\Command.au3"') Exit EndFunc Func _Exit () Exit EndFunc Edited January 31, 2008 by John2006 Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
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