Re: keystroke "esc"
Re: keystroke "esc"
- Subject: Re: keystroke "esc"
- From: Christopher Stone <email@hidden>
- Date: Sun, 03 Feb 2013 20:59:53 -0600
On Feb 03, 2013, at 17:48, Shane Stanley < email@hidden> wrote: If you want to force quit, you might as well dispense with the dialog:
tell application "System Events" set thePid to unix id of process "Mail" end tell do shell script "kill " & thePid
______________________________________________________________________
You can avoid the call to System Events (might as well if you're going to call a shell-script anyway).
Mountain Lion:
do shell script "pgrep Mail"
do shell script "kill `pgrep Mail`"
do shell script "pkill Mail"
Non-Mountain Lion:
kill `ps -o pid,comm -xc | awk '/Mail/ { print $1 }'`
-- Chris
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden