• 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: Closing a terminal window when a terminal process ends
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Closing a terminal window when a terminal process ends


  • Subject: Re: Closing a terminal window when a terminal process ends
  • From: Daniel Jalkut <email@hidden>
  • Date: Wed, 16 Nov 2005 23:01:22 -0500

Note that "exit" will only close the window if the Terminal preference for doing so is set. If the user has Terminal set to keep windows closed after tasks end, here's a particular funny way of accomplishing the goal:

tell application "Terminal"
try
do script "ssh email@hiddenn; exit; osascript -e 'tell application \"Terminal\" to close window 1'"
on error
beep
end try
end tell


Daniel

On Nov 16, 2005, at 12:12 PM, Brett K. wrote:

If you add "; exit;" to the end of a shell command, then it will exit and close the window when the command is complete.

I would try:

do script ("ssh " & clientUsername & "@serverAddressIsHere" & "; exit;")

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Closing a terminal window when a terminal process ends (From: Maccin <email@hidden>)
 >Re: Closing a terminal window when a terminal process ends (From: "Brett K." <email@hidden>)

  • Prev by Date: Re: Modification Date of Bundle script not changing
  • Next by Date: Re: The script running finding a path to itself
  • Previous by thread: Re: Closing a terminal window when a terminal process ends
  • Next by thread: localization of ICAS daygroup constants
  • Index(es):
    • Date
    • Thread