1

Sometimes in the Windows OS, a program is able to open a new window which disables it's underlying window. Closing the newly opened window of course re-enables the first window. I want to enable the underlying window without closing the newly opened window with Autohotkey.

I made a gif which shows the situation perfectly: https://i.sstatic.net/Df4Fm.jpg

I thought I might be able to pull this off with window styles and window extended styles, so here's what I tried:

^!e::
MouseGetPos,,, WindowUnderMouse
WinSet, Style, -0x8000000, ahk_id WindowUnderMouse
return

But it didn't work. I also did a lot of googling on this, but I didn't know what would be the proper keywords so I didn't find anything. Any idea how to accomplish this?


Some keywords for google:

How to make a modal window modeless How to enable a disabled window How to make a palette window How to make a modal window a palette window How to enable parent window Child window disabling parent window

https://autohotkey.com/board/topic/49376-making-a-gui-dialog-modal/ https://autohotkey.com/docs/commands/Gui.htm

6
  • 3
    That's called a "modal" window, btw.
    – Blorgbeard
    Commented Apr 19, 2019 at 16:05
  • I feel like this is going to be handled in the application itself, not really a windows piece that AHK could access right?
    – Zack Tarr
    Commented Apr 19, 2019 at 17:50
  • 1
    I don't know if the idea could work or not but it's missing the percent signs: ahk_id %WindowUnderMouse%
    – scso
    Commented Apr 21, 2019 at 8:19
  • 1
    @scso wow it worked :o Thank you
    – Shayan
    Commented Apr 21, 2019 at 12:09
  • 1
    Related question (not specific to AHK): Unmodalize Dialogs
    – Socowi
    Commented Jun 16, 2020 at 10:57

0

Browse other questions tagged or ask your own question.