hatchetman 0 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 Share this post Link to post Share on other sites
CyberSlug 6 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! Share this post Link to post Share on other sites
Jon 1,009 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/ Share this post Link to post Share on other sites
hatchetman 0 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! Share this post Link to post Share on other sites
MattNis 0 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] Share this post Link to post Share on other sites