Jump to content

Recommended Posts

Posted

I got some help from some people on this site a while ago with how to close all open windows. The following code was given to me and it works great, But on some computers it will bring up the Shutdown windows screen, then close it, then bring it back up and get stuck in this loop. Any ideas?

Send("!+{Tab}");Alt+Tab switches to the next active window

While Not WinActive("classname=Progman");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
Posted

Are the machines it tries to shut down Windows 9x machines? Is Progman the classname of the the desktop itself on 9x (It is on 2000/XP). Killing off the explorer process (Or Desktop window) on Windows 9x will try to shut the computer down.

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
×
×
  • Create New...