hatchetman Posted March 4, 2004 Posted March 4, 2004 Hello, I am new to AutoIT and I was wondering if there is a way to close (killl) all open windows on the desktop. -Thanks
CyberSlug Posted March 4, 2004 Posted March 4, 2004 (edited) Not tested, but might work. It should keep activating and closing windows until none is left. Send("!Tab");Alt+Tab switches to the next active window While Not WinActive("Program Manager");Program Manager is the Desktop WinKill("");kills the active window WinClose("");Because WinKill might not work on Explorer windows Send("!Tab") sleep(100) ;pause a few milliseconds WEnd Hmm, looking at my post count, this post is potentially Edited March 4, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Administrators Jon Posted March 4, 2004 Administrators Posted March 4, 2004 I'll put a "get windows" function on the todo list. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
hatchetman Posted March 4, 2004 Author Posted March 4, 2004 The reason why is I want to write a script that automates some tasks for myself on the internet and depending on my connection speed it might fail. If it fails I would like the ability to close all the windows on the desktop and start over fresh. Thanks for all the great responses!
MattNis Posted March 4, 2004 Posted March 4, 2004 do you want to kill internet explorer windows specifically? you could use ProcessClose("iexplore.exe") [quote]I was busy waiting all night for the Columbus Day Bunny to come down my chimney and light fireworks in my pumpkin.There's so much wrong with that.Oh, I'm sorry, i forgot you were Jewish.[/quote]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now