Page 1 of 1

Active Window Detection

Posted: Thu Nov 07, 2013 9:23 pm
by SBMastering
I've designed a plugin where the hotkeys/keyboard shortcuts are very important.

If the plugin window is not the active window, then the hotkeys/keyboard shortcuts won't work. Instead, they will control the DAW.

I'd like to have something in the GUI to show if the plugin window is active or not. Basically, you glance over and if it's green, you know you can use the hotkeys, if it's red then you know you can't and that you need to make the window active.

Has anyone run across a way to do this?

Re: Active Window Detection

Posted: Thu Nov 07, 2013 10:01 pm
by trogluddite
I've just started looking into this myself - I want to make a plugin that turns MIDI or XBox buttons into key presses and other commands that I can send to another app'.
The functions we both need can be accessed using Ruby and the Win32API class to call the Windoze .dlls. There's a section of the user guide about using Win32API, but I've still yet to fully work out the right call signatures for the .dll functions (the Microsoft API doc's are not very helpful!).
I've done similar stuff using AutoIt before, but that hides all of the nasty .dll call stuff.
If I get anywhere, I'll let you know - but hopefully someone with a bit more Windows API experience will be able to chip in before my head explodes!