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

Closing a terminal window when a terminal process ends


  • Subject: Closing a terminal window when a terminal process ends
  • From: Maccin <email@hidden>
  • Date: Wed, 16 Nov 2005 12:02:10 -0500

Thank you for your assistance.  I have written a small applescript to
get a user's username, open terminal, and connect to a server using
ssh:

-- Get the client's user name and store in clientUserName
set clientUsername to ""
repeat until clientUsername is not equal to ""
	display dialog "Enter your username:" default answer ""
	set clientUsername to text returned of result
end repeat

-- If you want to see the client's entry uncomment the following:
--display dialog clientUsername

--open the Terminal Application
tell application "Finder"
	activate
	open application file "Terminal.app" of folder "Utilities" of folder
"Applications" of startup disk
end tell

-- Now tell the Terminal to connect to the server
tell application "Terminal"
	do script ("ssh " & clientUsername & "@serverAddressIsHere")
end tell

I want applescript to close the terminal window I opened when the ssh
process ends (when they log out) but I'm not sure how to do so.  Any
suggestions are appreciated.
 _______________________________________________
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

  • Follow-Ups:
    • Re: Closing a terminal window when a terminal process ends
      • From: "Brett K." <email@hidden>
  • Prev by Date: Re: Web text to word
  • Next by Date: Re: Closing a terminal window when a terminal process ends
  • Previous by thread: Re: Using a prompt value from another handler
  • Next by thread: Re: Closing a terminal window when a terminal process ends
  • Index(es):
    • Date
    • Thread