So I wanted FreePIE to know which game I'm playing and "activate" different parts of the script which as specifically made for a game. To figure that out FreePIE needs to know which process is owning the foreground window. As there was no such functionallity in FreePIE I've created my own plugin for that. It has three functions and methods to be used in a script:
- Window.is_active(<process name>) - test if a process is owning the foreground window
- Window.active - get the name of the process owning the foreground window
- Window.activate - make a process the foreground window
My pull request: https://github.com/AndersMalmgren/FreePIE/pull/79