Jump to content

Close all Windows


Recommended Posts

Hi everybody

I need a script, which can close all non responding windows.

I would do this with winclose but it doesn't work.

My script should close all windows and after this shutdown the computer.

But when I didn't save a document the script should do nothing.

Thx for your help.

Link to comment
Share on other sites

People here don't write scripts on request (unless you pay some dollah)

I suggest you look in the helpfile for some assistant, you could also provide us with the code you have already written so the friendly community that is AutoIt can TRY and help.

Steve

Edited by Steveiwonder

They call me MrRegExpMan

Link to comment
Share on other sites

Generally people dont post a full script on request, however occasionally people are in a generous mood... that and this only took 30 seconds

#RequireAdmin
Opt("WinTitleMatchMode", 2)
WinClose ("not responding")

I have tested it, by making a notepad window and saving it as not responding... however it appears it is case sensitive. It may not work however, it just depends on the permissions of the window you are trying to close - I dont remember if when windows shows the title as not responding if it is capitalized or not so if it sets it to "Not Responding" then you will have to change case.

Enjoy

Link to comment
Share on other sites

I suggest to use WinKill :

#RequireAdmin
Opt("WinTitleMatchMode", 2)
WinKill ("not responding")
Edited by logmein
Link to comment
Share on other sites

I suggest to use WinKill :

#RequireAdmin
Opt("WinTitleMatchMode", 2)
WinClose ("not responding")

Yes, that would generally be much better if the program being closed has higher permissions however if the not responding window is an explorer window then winkill will not work. I guess you could combine the two so it is something like

#RequireAdmin
Opt("WinTitleMatchMode", 2)
WinClose ("not responding")
WinKill ("not responding")

however its important to note that its case sensitive.

Hope us two have helped, let us know if you need more assistance...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...