Faustvii Posted February 7, 2006 Share Posted February 7, 2006 (edited) AlarmDialog expandcollapse popup#NoTrayIcon FileInstall("Alarm.exe", "") GUICreate("Alarm", 500, 200) GUICtrlCreateLabel("Set Alarm Time:", 30, 50) GUICtrlCreateLabel("Set Alarm Sound:", 30, 85) GUICtrlCreateLabel("Press Here when your Awake -------->", 30, 135) GUICtrlCreateLabel("If you click exit or close this program then the alarm wont work keep this open.", 30, 175) $Time = GUICtrlCreateInput("00:00:00", 30, 65, 210, 20) $alarmsound = GUICtrlCreateInput("wakeup.mp3", 30, 105, 210, 20) $alerboxtime = GUICtrlCreateButton("Set Time", 242, 62, 95) $alerboxsound = GUICtrlCreateButton("Set Sound", 242, 102, 95) $imup = GUICtrlCreateButton("Im Awake", 242, 130, 95) GUICtrlCreateLabel("Options:", 400, 10) $Exit = GUICtrlCreateButton("Exit", 400, 25, 95) $startalarm = GUICtrlCreateButton("Start", 400, 50, 95) $start = IniWrite( "alarmsetup.ini", "Settings", "Alarmtime", "00:00:00") $start1 = IniWrite( "alarmsetup.ini", "Settings", "AlarmSound", "wakeup.mp3") $Alarmfile = IniRead("alarmsetup.ini", "Settings", "Alarmsound", "wakeup.mp3") $Alarmtime = IniRead("alarmsetup.ini", "Settings", "Alarmtime", "") GUISetState(@SW_SHOW) Func Alerttime() $whattime1 = GUICtrlRead($Time) $whattime = IniWrite( "alarmsetup.ini", "Settings", "Alarmtime", "" & $whattime1) MsgBox(1, "Alarm", "Alarm Time Is: " & $whattime1) EndFunc;==>Alerttime Func alarmstart() Run( "Alarm.exe") EndFunc;==>alarmstart Func Alarmsound() $whatsound1 = GUICtrlRead($alarmsound) $whatsound = IniWrite( "alarmsetup.ini", "Settings", "AlarmSound", "" & $whatsound1) MsgBox(1, "Alarm", "Alarm Sound Is: " & $whatsound1) EndFunc;==>Alarmsound Func close() ProcessClose("Alarm.exe") ProcessClose("AlarmDialog.exe") EndFunc;==>close While 1 $msg = GUIGetMsg() Select Case $msg = $startalarm alarmstart() Case $msg = $imup ProcessClose("Alarm.exe") Case $msg = $alerboxtime Alerttime() Case $msg = $alerboxsound Alarmsound() Case $msg = $Exit close() EndSelect WEnd Alarm #include <Date.au3> #NoTrayIcon $Alarmfile = IniRead("alarmsetup.ini", "Settings", "Alarmsound", "") $Alarmtime = IniRead("alarmsetup.ini", "Settings", "Alarmtime", "") Func Wakeup() $alarm = $alarm + 1 Do SoundPlay($Alarmfile, 1) Sleep(2500*87) Until $alarm = 350 EndFunc ;==>Wakeup While 1 $time1 = _NowTime(5) Sleep(250); sleep Sleep(250); sleep Sleep(250); sleep Sleep(250); sleep If $time1 = $Alarmtime Then Wakeup() WEnd First run alarmdialog and then run alarm Tell me what you think.. Ty updated alarm whit help from SmOke_N Edited February 7, 2006 by Liope Link to comment Share on other sites More sharing options...
Faustvii Posted February 7, 2006 Author Share Posted February 7, 2006 28 views and no replys Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 7, 2006 Moderators Share Posted February 7, 2006 28 views and no replys $alarm = 1 + 1 Do SoundPlay($Alarmfile, 1) $x = 1 + 1 Do Sleep("2500") Until $x = 87 Until $alarm = 350 Wouldn't you just be stuck in the 2nd Do loop forever? You never let it out of the loop because $x will never = 87 if it can't continue. I don't know what your trying to accomplish there or I would try to write a For loop for you on it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Faustvii Posted February 7, 2006 Author Share Posted February 7, 2006 cause i didnt want to have 87 sleeps there so i changed it and i havent testede it so i didnt knew if it would work.. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 7, 2006 Moderators Share Posted February 7, 2006 (edited) Would this work?For $i = 1 To 350 SoundPlay($Alarmfile, 1) Sleep(2500*87) Next or this?Local $alarm = 0 Do $alarm = $alarm + 1 SoundPlay($Alarmfile, 1) Sleep(2500*87) Until $alarm = 350 Edit: Typo Edited February 7, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Faustvii Posted February 7, 2006 Author Share Posted February 7, 2006 ty didnt knew you could use 2500*87 in a sleep.. Link to comment Share on other sites More sharing options...
GrungeRocker Posted February 7, 2006 Share Posted February 7, 2006 i made this a loooooooooooooooooooooooooooooong time ago and it was more easy to use -.- and that all, because it was only 1 data! [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 7, 2006 Moderators Share Posted February 7, 2006 For future reference also, $x = 1 + 1 will always = 2, you'll delclare $x then use $x = $x + 1 for released version or $x += 1 for beta version. Local $x = '' Do $x = $x + 1 Until $x = 100 MsgBox(0, 'Test', $x) Or for beta Local $x = '' Do $x += 1 Until $x = 100 MsgBox(0, 'Test', $x) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 7, 2006 Moderators Share Posted February 7, 2006 i made this a loooooooooooooooooooooooooooooong time agoand it was more easy to use -.-and that all, because it was only 1 data!Any point here other than your perfection in helping Liope with his/her project? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Faustvii Posted February 7, 2006 Author Share Posted February 7, 2006 (edited) oh the $x thing must be a typo ill just change it ty for the help SmOke_N What do you think about the alarm? Edited February 7, 2006 by Liope Link to comment Share on other sites More sharing options...
rambo3889 Posted February 10, 2006 Share Posted February 10, 2006 it works fine (i remember your netparty ) My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! Link to comment Share on other sites More sharing options...
Faustvii Posted February 10, 2006 Author Share Posted February 10, 2006 it works fine (i remember your netparty )totaly chock to everbody when it played a song.. Link to comment Share on other sites More sharing options...
rambo3889 Posted February 10, 2006 Share Posted February 10, 2006 (edited) Yes white noise Edited February 10, 2006 by rambo3889 My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight! 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