Here's a crude example. Notice that Backplate is set to alwaysontop but the other windows show above it. Window1 hides when Window2 is launched and Winwaitclose pauses the thread until Window2 is hidden. If you want Window1 to be visible at the same time as Window2 then I think you will need to have routines to disable (and later enable) the controls using GuiControl. I don't know about MDI. You could look at GUI +Parent but I managed to crash AHK when I tried that. Hope this helps:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Recommended for catching common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Gui, 99:-Caption +AlwaysOntop +ToolWindow
Gui, 99:Color, cFFFFCC, white
Gui, 99:show, center w%A_screenwidth% h%A_screenheight%, BackPlate
Gui, 99:maximize,
Gui, 90:-Caption +ToolWindow +Owner99
Gui, 90:font, s30
Gui, 90:Add, button, gShow80, Show Next Dialogue
Gui, 90:Add, button, gCloseAll, Close The Show
Gui, 90:show, center autoSize, Window1
Gui, 80: +Owner90
Gui, 80:font, s30
Gui, 80:Add, button, gClose80, Close This Dialogue
Gui, 80:Add, button, gCloseAll, Close The Show
Gui, 80:show, hide center autosize, Window2
Return
CloseAll:
ExitApp
return
Close80:
Gui, 80:hide
return
Show80:
Gui, 90:hide
Gui, 80:Show
WinWaitActive, Window2 ; wait for Window2 to be active
WinWaitClose, Window2 ; wait for Window2 to be destroyed
Gui, 90:show
return