Windows – AutoHotKey script to automatically close a window when it opens

autohotkeywindows 7

How can I use AutoHotKey to automatically close a pop up window called Microsoft Office Wizard every time it pops up. The window can be closed using Alt+F4 or by clicking on a Close button.
I'd like this script to be running in the background and close the pop up every time it opens.
Many thanks

Best Answer

A script like the following will kill Notepad as soon as it is opened to create a new document:

Loop
{
    WinWait, Untitled - Notepad
    WinClose, Untitled - Notepad
}

Replace the WinTitle parameters for WinWait and WinClose as required.

Related Question