I'm looking for a way to create a Python script that will alert me whenever Spotify is opened on my computer. My family has been using my Spotify account without permission, and I want to have a notification pop up telling them to use guest mode instead. Any suggestions on how to achieve this?
2 Answers
Honestly, what you're describing sounds a bit extreme. Trying to track process openings like that feels more like creating a virus than any helpful app. It's really not an ideal situation, and there might be better ways to handle your family's access to your account.
You might want to check out a library called psutil. It can help you monitor processes by polling, but just note that it won't give you real-time alerts when an app launches. It's probably a good idea to consider securing your account instead. Maybe just lock your PC or set up guest accounts for your family to avoid any issues with your Spotify credentials.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically