Active Window Detection

DSP related issues, mathematics, processing and techniques
Post Reply
User avatar
SBMastering
Posts: 17
Joined: Tue Jun 12, 2012 11:47 pm

Active Window Detection

Post 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?
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Active Window Detection

Post 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!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Post Reply