Jump to content
Sign in to follow this  
chnooorzi

Close all Windows

Recommended Posts

chnooorzi

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.

Share this post


Link to post
Share on other sites
Steveiwonder

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

Share this post


Link to post
Share on other sites
omnomnom

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

Share this post


Link to post
Share on other sites
logmein

I suggest to use WinKill :

#RequireAdmin
Opt("WinTitleMatchMode", 2)
WinKill ("not responding")
Edited by logmein

Share this post


Link to post
Share on other sites
omnomnom

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...

Share this post


Link to post
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
Sign in to follow this  

×