Sign in to follow this  
Followers 0
Siddhartha

Possible to Change Windows Sound Scheme Per Time of Day?

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Siddhartha

Share this post


Link to post
Share on other sites

While 1
If @Hour > 5 And @Hour < 11 Then
;Do Whatever
EndIf
WEnd

That should point ya in the right direction.

Share this post


Link to post
Share on other sites

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

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