My goal is to be able to access the name of a process that I know the process name and PID of. I'm not looking for the process name.
That's the general goal but to be clear I'll use the specific example I'm working on. I want to be able to determine the current song being played on Spotify, but can't use the API because I would want to determine it every couple of seconds and I'm not sure it would be a good idea to keep pinging the API (which is how I'm assuming it works).
A solution I can see is that the main app process names itself after the current song in task manager (but it's process name is still spotify.exe) as can be seen here
My question is can I access that specific name, preferably with python? I've also checked powershell tasklist /svc and it isn't used there as a service name.
Thanks