Use list of currently running software on Windows PC to trigger automations?

I have HASS.Agent installed and I want to play/pause media when my presence sensor detects/clears my presence BUT I don’t want it to perform the automation if I’m playing a game so I thought if I could use a trigger that basically says “If Steam.exe is running stop the automation”

Anybody got any ideas?