Siddhartha Posted December 13, 2008 Share Posted December 13, 2008 When people change the default Windows sound scheme they can have whatever they want played when they log on, startup, etc. Well, is it possible to create a sound scheme per time of day? For example, you have a voice recording that says, "Good morning, Bob", and one that says, "Good evening Bob". I thought of maybe making a script to change out the WAV files after checking the time, but the script would somehow have to check the time and change out the files before the logon sound is played. I figured that the one easiest way to do this would be to just assign a startup job to my Vista task scheduler. The scheduled program would just check the time of day, to eventually have a morning/afternoon/evening sound scheme. To do this in individual parts is not a hassle, just keeping track of it get's a little confusing. That's why I'm asking if a script to automate it more easily is conceivable. If anyone has any ideas or example programs, please don't hesitate to post! Thanks a ton. Link to comment Share on other sites More sharing options...
Paulie Posted December 13, 2008 Share Posted December 13, 2008 Time Macros. @HOUR @MIN @SEC They work Just like variables. ;Check if time is 6:00PM If @Hour = 18 and @Min = 0 then MsgBox(0,"Time", "It's 6:00 PM") EndIf Link to comment Share on other sites More sharing options...
Siddhartha Posted December 13, 2008 Author Share Posted December 13, 2008 (edited) Good to hear from you Paulie. Last time I spoke with you, you had 500 posts . Thanks for reminding me, it's been a long time since I've used AutoIt unfortunately. Could you point out how to identify a time to a time, such as @Hour = 5 and @Min = 0 through @Hour = 11 and @Min = 59 ? Because would I be incorrect in thinking that that would only run the action at that specific time? Thanks. Edited December 13, 2008 by Siddhartha Link to comment Share on other sites More sharing options...
Paulie Posted December 14, 2008 Share Posted December 14, 2008 While 1 If @Hour > 5 And @Hour < 11 Then ;Do Whatever EndIf WEnd That should point ya in the right direction. Link to comment Share on other sites More sharing options...
BrettF Posted December 14, 2008 Share Posted December 14, 2008 (edited) Hows this go? $oldhour = 17;Just hardcoded in my case for testing. Usually set to @hour While 1 Sleep (2000);Check every 2 seconds or so. Since we dont really need it to be that acurate... :) If $oldhour <> @HOUR Then $oldhour = @hour Switch @HOUR Case 6 To 11 _ChangeIt ("Morning") Case 12 To 17 _ChangeIt ("Good Afternoon") Case 18 To 21 _ChangeIt ("Good Evening") Case Else _ChangeIt ("What are you still doing up?") EndSwitch EndIf WEnd Func _ChangeIt ($msg) MsgBox (0, "Change it!", "The time is: " & @hour & ":" & @MIN & ":" & @SEC & @CRLF & @CRLF & $msg);Display Message Exit;I just want to exit now. EndFunc Not sure how to change the sound scheme though. Will have a dig around though Cheers, Brett Check out "HKEY_CURRENT_USER\AppEvents\Schemes\" That seems to have your sound schemes and the like. Edited December 14, 2008 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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