I'd like to code up a function for my Windows10 machine that continually monitors my keyboard and mouse activity and sends an email if no activity occurs after X hours (and likely during a timespan like 7:00 AM to midnight).

I'm comfortable with procedural coding (PHP & PERL), I was pretty OK with BASIC a few decades ago, I can find my way around OOP but it's still a bit out of my comfort zone, and would prefer not to have to learn C or spend any money to do this.

BASIC seems painless; would VB be adequate for this project, and can someone give me a little nudge about how I'd want to code this? I guess it'd need to run as a service?

I'd appreciate any tips you guys might have for me.