I tend to get dragged into new tasks as I meander around the building and sometimes going for a drink of water ends of turning into an hour long tech support venture. If I'm just running to the drinking fountain I usually don't turn off my music. I'm wondering if anyone has written a script that detects both key presses and mouse movement simultaneously? Ideally I'd love to have a script that if neither are detected after 5 mins, it closes my music app.
A little script, you'll have to customize it for your own music player.
For 5 minutes, if inactive, it'll stop the process.
#singleinstance force
SetTimer IdleChk,300000
IdleChk:
if (A_TimeIdlePhysical > (60*60*1000))
process, close, foobar2000.exe
RETURN
Hope it works for you. If not, somebody else with more skill than I do can put something better.
Using the code to pause windows media player from my tip at lifehacker, Universal shortcuts to windows media player , you can have something like:
SetTimer, IdlePause, 10000 ; checks every 10 seconds
return
IdlePause:
If A_TimeIdlePhysical > 300 ; if idle time is greater than 5 minutes
PostMessage, 0x111, 18809, 0, ,Windows Media Player ; Stop Playing Track
There other things you can do also. you can only mute the player by replacing the last line with:
PostMessage, 0x111, 18817, 0, ,Windows Media Player ; Volume Mute
I suggested your topic to a friend of mine and a couple of minutes later he came up with this: http://apps.nozavi.com/downloads?task=view.download&cid=19
I started using it and found it is actually pretty cool.
You must log in to post.