Re: How does one create a .app that launches a .term document (in Terminal) when opened?
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.