|
The most common application for KILL is to avoid the problem of
having multiple instances of an application (like a browser) running
at once. Just call KILL to close any running instances before opening
a new one.
usage: kill.exe pattern
If you call KILL without specifying a value for the pattern
argument, nothing will happen. If you supply a value for the pattern,
any window that contains the pattern in its caption will be terminated.
Case is not important but spaces are significant.
KILL asks each application to end by sending it a WM_CLOSE message.
Well behaved applications will perform an orderly shutdown, but
there is no guarantee that an application will be terminated. You
should test KILL from a DOS prompt to make sure you understand how
it works before using it.
This actionScript command fscommand("EXEC",
"kill.exe" + chr(9) + Internet"); will terminate
all open windows that have "Internet" in the caption.
You can follow this with a call to kill "Netscape" if
you're unsure which browser your user is running.
- If you use the old Flash trick of using tabs in place of spaces,
KILL will look for tabs in the caption (exact match) and will
probably fail to find the window.
- Flash 5 will allow you use a tab between the application name
and the pattern.
- Flash MX does not allow spaces in the argument to the EXEC actionScript
command. This means that the KILL utility can't be called directly
from Flash MX.
- In a batch file the pattern can contain spaces which provides
a workaround for Flash 5 limitations and makes it possible to
use KILL from Flash MX projectors.
- If you're working with SWF Studio you can use spaces in the
pattern argument.
 
|