 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
h4xx0r n00bl37
Joined: 14 Mar 2008 Posts: 56
|
Posted: Tue Jun 17, 2008 6:31 pm Post subject: Need help with a script...[ destroy all open windows ] |
|
|
I'm trying to make something that will destroy all open windows. This is what I have right now.
| Code: |
loop,30
{
WinKill,,,1,,
}
ExitApp
|
Once it is finished I will burn it to a CD and act as a task manager incase I accidentaly screw myself over with a script.
[ Moderator!: Please use meaningful subject line in future ] |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Tue Jun 17, 2008 6:45 pm Post subject: |
|
|
you will cause more damage with this script than you can cause with another script.
Simply build a safety into all your other scripts (I use ) Just hit Shift Escape to kill the scripts. that are watching for it. once a script is safe and tested, remoev this hotkey. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5890
|
Posted: Tue Jun 17, 2008 7:04 pm Post subject: Re: Need help with a script...[ destroy all open windows ] |
|
|
| h4xx0r n00bl37 wrote: | | incase I accidentaly screw myself over with a script. |
You may use the following script which shall gracefully end all running AHK scripts ( including those compiled ) :
| Code: | DetectHiddenWindows, On
WinGet, List, List, ahk_class AutoHotkey
Loop %List%
{
WinGet, PID, PID, % "ahk_id " List%A_Index%
If ( PID <> DllCall("GetCurrentProcessId") )
PostMessage,0x111,65405,0,, % "ahk_id " List%A_Index%
} |
 _________________ SKAN - Suresh Kumar A N |
|
| Back to top |
|
 |
andrei901(not yet logged) Guest
|
Posted: Tue Jul 08, 2008 11:31 pm Post subject: |
|
|
could his script be used to kill all open windows without killing processes?
if, for example, i write a multi-part script, could i use his command as a failsafe between parts if the actual script doesn't close the window due to lag? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|