Share this post

Link to post

Share on other sites

CyberSlug 3

CyberSlug 3

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

Share this post

Link to post

Share on other sites

hatchetman 0

hatchetman 0

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

MattNis 0

[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]