Even the examples and documentation I have read are beyond me. I thought the concept made sense but I am missing something. It is a short test. I want to know any time any program activates (opens?) a window. Here is what I have: GUIRegisterMsg($WM_ACTIVATE, "MyActivateFunc") HotKeySet("{ESC}", "Quit") While 1 WEnd Func Quit() Exit EndFunc Func MyActivateFunc($hWndGUI, $MsgID, $WParam, $LParam) ConsoleWrite("Window activated" & @CRLF) EndFunc