|I've made a little C# program to send a keystroke to Media Player Classic to play/pause it. I'll leave the usage of this program to your imaginations. |
My question is how can I get the title of a program by it's exe name.
In order to send keystrokes the target program has to be active and the method I have for switching a program to being active takes the title of the program. Which for MPC is usually the currently playing filename, however you can change an option to set it as "Media Player Classic Home Cinema". I'd rather not have to set MPC's title to be static and would prefer to have it show the currently playing filename. So I need a way to get the title of the currently running mpc-hc.exe.