Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
show 2 more comments

1 Answer

up vote 0 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.