$appactive should be returning false because mIRC no longer has focus, the dialog does. Also, using /window will change the active window in mIRC but it will not give mIRC focus. Use
/showmirc instead.
dialog test {
title "Test Dialog"
size -1 -1 100 100
}
on *:DIALOG:test:init:0: {
[color:green];the reason i'm using a timer here is because
;/showmirc won't be triggered otherwise.[/color]
.timer 1 0 showmirc -s
}
/showmircManipulates the display of the main mIRC window, where -n = minimize, -r = restore, -s = show, -t = tray, -x = maximize, -o = on top, -p = not on top, -m = minimize according to tray settings.