BigDaddyO Posted May 14, 2004 Share Posted May 14, 2004 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 Link to comment Share on other sites More sharing options...
Valik Posted May 14, 2004 Share Posted May 14, 2004 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. Link to comment Share on other sites More sharing options...
BigDaddyO Posted May 14, 2004 Author Share Posted May 14, 2004 I only run the script on 2000/XP machines. The problem will occur on either a 2000 or XP but not on every computer, just some... Link to comment Share on other sites More sharing options...
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