Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
    
Have you come up with anything yet? – Karan Jun 26 '13 at 20:08
    
Well, sort ofHave come up with – John Jun 26 '13 at 20:22
    
Well sort of, I'm a newbie at this, I'm afraid. Came up with IfWinExist, Microsoft Office Wizard { WinActivate ; Automatically uses the window found above. Send, {Alt Down}{F4} } – John Jun 26 '13 at 20:23
    
But I need to have it running automatically so that the script is sent every time this window pops up – John Jun 26 '13 at 20:24
    
Take a look at WinWait or WinWaitActive. If required you can use it inside a loop so it runs continuously, waiting for the window and closing it every time it pops up. – Karan Jun 26 '13 at 20:30
up vote 2 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .