This post is from a low-reputation account and contains an unverified outbound link. Be cautious before clicking external links.

Sleep timer that presses spacebar to pause your show

Words
122
Reading
1 min
8y
Listen to this post
~1 min

I wrote a quick and dirty little program for my mom to pause her show when she's watching it on her computer. It's a 30 (configurable) min timer that resets every time you move the mouse or press a button. After 30 minutes of inactivity, it presses the spacebar key pausing the show. It can't tell if your show is playing or not so it could start your show too. This is windows based only.

Link to the github code

If anyone has any suggestions on how to detect if a show is still playing, I'd love to hear it. I was thinking of detecting if audio was being played but couldn't find one in golang.

Originally published on my blog halfwitprogrammer.com

Sleep timer that presses spacebar to pause your show | Ecency