On 03 Jul 2004, at 06:18, Thomas Tempelmann wrote:

Warren asked:

How do you kill classic via whistleblower?

Using AppleScript.

Here's the AS code I use:

--do shell script "/bin/ps -xa"
do shell script "pid=` /bin/ps -x | /usr/bin/grep \"Classic
Startup.ap[p]\" | /usr/bin/awk '{print $1}'` ; kill $pid"

no sense messing with all that.

do shell script "kill `/bin/ps x| /usr/bin/grep \"Classic Startup\" | grep -v grep | /usr/bin/awk '{print $1}'`"

(first, the - is deprecated for ps, second, you need to exclude the grep because it MIGHT have a lower PID that the Classic Startup, third no reason to mess with storing off to variables when you can do it all in a single command.)


delay 3 -- seconds
with timeout of 3 seconds
        try
                open application "Classic Startup"
        end try
end timeout


--
There are strange things done in the midnight sun/By the men who moil for gold;
The Arctic trails have their secret tales/That would make your blood run cold;
The Northern Lights have seen queer sights,/But the queerest they ever did see
Was the night on the marge of Lake Lebarge/I cremated Sam McGee



############################################################# This message is sent to you because you are subscribed to the mailing list <[EMAIL PROTECTED]>. To unsubscribe, E-mail to: <[EMAIL PROTECTED]> To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]> To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]> Send administrative queries to <[EMAIL PROTECTED]>



Reply via email to