Re: osascript and *.command files
Re: osascript and *.command files
- Subject: Re: osascript and *.command files
- From: Axel Luttgens <email@hidden>
- Date: Sun, 07 Oct 2007 13:19:21 +0200
On 7/10/07 11:18, Thomas Treichl wrote:
Hi,
I'm having a problem if I try to run eg. a shell script from a
*.command file written with osascript. In detail, I have the following
part of code saved in the file test.command and placed on my Desktop:
osascript 2>&1>/dev/null <<EOF
tell application "Terminal"
activate
do script "ls"
end tell
EOF
I double-click the test.command, two Terminal.app windows open (the
first one already shows a 'process terminated' message - forget about
that window) and the second window shows me the output of 'ls'. I
expect that I can use this second window for my ongoing work,
Do you mean interactively, by entering commands on the keyboard?
ie. I try to call another *.command file (or the same *.command file)
with the 'open' command, ie.
open ~/Desktop/other.command
or
open ~/Desktop/test.command
and I see that I can't see anything starting/happening anymore. The
Terminal window seems to be some kind of frozen. I expect I'm having a
mistake in my example above but I don't have any idea where it is?
What happens if you run the .command file directly, e.g. by typing:
~/Desktop/other.command
After all, the .command file is just a regular shell script, and
Terminal.app is already opened.
But I'm not sure to have correctly understood your question.
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden