I have an Autohotkey script that displays a msgbox and is always on top (very important to have this). I would like the msgbox to be closed ONLY under these 2 conditions:
- I manually close it myself.
- When a specific window is closed, then close the msgbox.
Here's the main part of the code that I currently have:
msgbox,262144,TimesheetBlah,% list "`n" "`n" list2
clipboard := listCopy
WinActivate,Manage: Time Entry
WinShow, Manage: Time Entry
WinWait, Manage: Time Entry
WinWaitClose ; Wait for the exact window found by WinWait to be closed.
ControlClick, Button1, TimesheetBlah // This should close the msgbox, but it doesn't
if WinExist("*TimesheetBlah*"){
WinClose ; use the window found above // This doesn't close the msgbox either
How can I achieve this?