• Simple clock chimes – am I missing something ?

    Home » Forums » AskWoody support » Windows » Windows – other » Simple clock chimes – am I missing something ?

    Author
    Topic
    #503934

    I tend to get absorbed in things and not notice the passing of time. To remind me to pay attention I want to be able to set my PC to issue a little beep every 15 minutes. But because I leave my PC on overnight from time to time I’d like the beeps to occur only during set hours. I don’t need to replace the System tray clock or have a fancy skinnable clock on my desktop – only a simple beep.

    I’ve just spent a couple of hours searching for a solution without success.

    In previous versions of Windows going back to ‘9X there were various free utilities (tclock, tclock-ex, alfaclock, talkingclock,etc) that used to do what I need. But from what I can see they’ve all been abandoned or become bloated and expensive.

    Can any one point me at something that will do what I’m looking for – or suggest a simple scripting workaround?

    Thanks!

    Viewing 9 reply threads
    Author
    Replies
    • #1545449

      There’s the basis of a simple solution in this BATch file, without the start and stop times

      Code:
      @echo off
      :loop
        echo %time%
        REM  V the character after ECHO need to be hex 07, the bell character
        echo •
        ping -4 -n 900 127.0.0.1 >nul
      goto :loop

      but the problem is with character sets. Even if you make the • character using Alt+7 (on the numeric keypad) it doesn’t work, whereas if on the command line you type echo [Ctrl+G] and press Enter it beeps.
      By [Ctrl+G] I mean to hold down the Ctrl key and press the G character – shows as ^G.

      PS If you want me to take this further, just ask!

      BATcher

      Plethora means a lot to me.

      • #1545456

        You might check out some of the suggestions at Gizmo’s Freeware…

        I’d already looked there as part of my initial hunt. Some of the clocks there are Vista/XP vintage and won’t run on Win10. The others all seem to allow repeats in units of days/weeks/months – but not hours/minutes.

        I installed and uninstalled about 8 or clocks 10 this morning. I’m glad I took a system image before I started so I can restore a clean C: 🙂

        There’s the basis of a simple solution in this BATch file, without the start and stop times

        PS If you want me to take this further, just ask!

        Interesting idea!

        A quick hunt took me to batch guru Rob v.d. Woude’s page: http://www.robvanderwoude.com/wait.php#SLEEP

        Using TIMEOUT rather than PING would probably be good practice. I’m not sure I’d want a batch window open the whole time I’m at the PC – but there may be a way to hide it. And if Bat-to-exe (http://bat2exe.net/) still works under Win10 one could create a stand alone executable…

        I think I shall have to have a play this weekend. If you decide to have a go too I’d be interested to see what you come up with..

    • #1545483

      NirCMD – use loop, wait and stdbeep (or beep)

      AutoHotkey:

      Code:
      Loop {
      	SoundBeep ; standard beep
      	Sleep, 900000 ; 15 mins
      }

      Hope this helps…

      • #1545537

        NirCMDAutoHotkey:

        Both of those look as if they could work more simply than hacking around with batch files. I assume NIRCMD called from a batch file means I’ll still have the DOS window sitting open the whole day while the script is running. I may download AHK and have a play if I can’t do it some other way.

        It just occurred to me that the Windows task scheduler can probably do what I want too. But I’d rather not have to create a complex task schedule on each PC that I use .

        I’ll keep looking

    • #1545628

      I’ve done some more playing with START “” /MIN but I’m getting an “out of memory” error message when terminating this child process. I’ll need to do some more work on it…

      BATcher

      Plethora means a lot to me.

    • #1546055

      Online version if you leave the browser open all the time http://www.mindfulnessdc.org/bell/index.html

    • #1546071

      And now a few words from the PowerShell camp! 😆

      Code:
      $SleepStartTime = "20:30:00"  #Begin Silent Time
      $SleepEndTime  =  "07:00:00"  #End Silent Time
      $Frequency     =  15          #Number of Minutes between beeps
      
      While ($True) {
      
          Start-Sleep -Seconds  ($Frequency * 60)
          $CurTime = Get-Date -format HH:mm:ss
          if ( ($CurTime -lt $SleepStartTime) -and ($CurTime -gt $SleepEndTime)) {
            (new-object Media.SoundPlayer "C:WINDOWSMedianotify.wav").play()
          }
      }
      

      As you can see you can adjust the times you want this to be quiet and the time between notifications. You can also use any .wav file by just changing the [noparse]C:WINDOWSMedianotify.wav[/noparse] to point to your file.

      Once started just minimize the powershell window to the taskbar and you’re done. Of course you could always create a scheduled task to start the program at boot so you wouldn’t have to worry about it at all.

      To close the program just close the PowerShell Window.

      If you’re unfamiliar with PowerShell see this post.

      PowerShell File: 43147-Play-SoundAtInterval

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1546090

      RG… very elegant! To be honest, I think you’ve nailed it. 🙂

    • #1546120

      Rick,

      As Elvis would say, “Thank you, thank you very much!” 😆 :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1546402

      Thank you guys for the suggestions!

      jsalpha2 Yesterday I changed my google search to include ‘chimes’ and found the same page. The site also has an downloadable chimer which is what I’m using at the moment:
      [INDENT]http://www.mindfulnessdc.org/mindfulclock.html%5B/U%5D%5B/url%5D [/INDENT]

      It’s almost 10 years old – but it has the option to chime every 15 minutes, and it hides invisibly in the system tray. It doesn’t have start/stop times though. I could handle that with the task scheduler but that feels like a kludge.

      Another solution nobody has mentioned yet would be to get an Android emulator and run one of the many Apps that can do chimes – vast overkill and also feels like a kludge.

      I like the RetiredGeek’s powershell script and would use it if it didn’t leave a window open and sit on the task bar.

      So the bonus question is: How can I run a powershell script (or batch file) with a system tray icon instead of a visible window?

      There is an Autohotkey script that should do the trick – but then I could do it all in AHK as suggested by RickCorbett

      I’m sure I can put together a solution that works for me using the suggestions in this thread. I’m just surprised that it’s not something that has been done many times before…

    • #1546450

      flippertie,

      You can create a ShortCut to run powershell that will TOTALLY hide this process (both task bar and task tray).

      Here’s the Target: [noparse]C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -WindowStyle “Hidden” -File “G:BEKDocsScriptsPlay-SoundAtInterval.ps1″[/noparse]

      Of course, you’ll change the drivepath to the .ps1 file.

      To stop the program now requires using the task monitor (Ctrl+Shift+Esc).

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1546970

      To bring the thread to a tidy end this is the solution that is working for me:

      – The Mindfulclock (linked to above) starts with my PC.
      – It’s configured to play a chime every 15 minutes on the quarter hours
      – It’s hidden in the system tray so I can easily stop it manually
      – A scheduled task runs a batch file at the end of the work day to stop the chimes.

      The batch command is :

      taskkill /f /t /fi “imagename eq mfclock.exe”

      – /f = force close
      – /t = also close child processes
      – /fi = filters for the process name you want to kill

      I haven’t used Powershell or Autohotkey before so while they both could build good (or better ) solutions I’ve stuck with CMD/Batch because that’s what I know.

      Thanks for the help folks!

    Viewing 9 reply threads
    Reply To: Simple clock chimes – am I missing something ?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: