Well, it may not be the most elegant way to do it, but...

Code:
Break on

Run "%comspec% /c start /min notepad.exe"

Sleep(5) ;or whatever code you'd like

If SetFocus ("Untitled - Notepad") = 0
$rc = SendKeys("~{F4}Y")
EndIf