• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Quit Terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quit Terminal


  • Subject: Re: Quit Terminal
  • From: Jeffrey Berman <email@hidden>
  • Date: Mon, 19 May 2003 12:26:52 -0500

On 5/19/03 5:40 PM, Emmanuel <email@hidden> wrote:

> I use this, but I never tried to apply it to Terminal:
>
> ----------------------------------
> on ELKillProcess(theProcess)
> if theProcess's length > 16 then set theProcess to text 1 thru 16 of
> theProcess
> try
> do shell script (find text "^[[:space:]]*([0-9]+).*" & theProcess & "$" in (do
> shell script "ps -wxc") using "kill \\1" with regexp and string result)
> 0
> on error
> error (theProcess & " was not launched")
> end try
> end ELKillProcess
> ----------------------------------
>
> For brevity this uses "find text" and thus requires either the Satimage osax
> or Smile (free software).

Why not just use 'killall'? As in:

do shell script "killall " & theProcess


-Jeff Berman
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Applescript LetterRip Server
  • Next by Date: Re: Applescript LetterRip Server
  • Previous by thread: Re: Quit Terminal
  • Next by thread: Attaching a PDF using Entourage and FileMaker
  • Index(es):
    • Date
    • Thread