• 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: How does one create a .app that launches a .term document (in Terminal) when opened?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does one create a .app that launches a .term document (in Terminal) when opened?


  • Subject: Re: How does one create a .app that launches a .term document (in Terminal) when opened?
  • From: John Delacour <email@hidden>
  • Date: Mon, 4 Nov 2002 15:26:55 +0000
  • Mac-eudora-version: 5.3a8

At 12:03 pm -0700 15/10/02, Yossie Silverman wrote:

I would like to create a MyApplication.app that, when double-clicked/opened, starts/opens Terminal with a specific MyTerm.term file. Anyone have any idea how to accomplish this?


set f to alias ":tmp:junk.term"
tell application "Terminal" to open f



Or, you can write a new file with whatever settings you want:


set tmp to ":tmp"
set f to "" & alias tmp & "junk.term"
set s to "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" "
set s to s & "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\";>
<plist version=\"1.0\">
<dict>
<key>WindowSettings</key>
<array>
<dict>
</dict>
</array>
</dict>
</plist>"
set fu to quoted form of POSIX path of f
open for access file f with write permission
set eof file f to 0
write s to file f
close access file f
do shell script "open -a Terminal " & fu
_______________________________________________
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: Activate - disable Internet Connection
  • Next by Date: [ANN] X-Commands 0.9
  • Previous by thread: Re: Activate - disable Internet Connection
  • Next by thread: [ANN] X-Commands 0.9
  • Index(es):
    • Date
    • Thread