• 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: osascript and *.command files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: osascript and *.command files
      • From: Thomas Treichl <email@hidden>
References: 
 >osascript and *.command files (From: Thomas Treichl <email@hidden>)

  • Prev by Date: Trouble with Remote Apple Events (eppc) and Keychain
  • Next by Date: Re: Trouble with Remote Apple Events (eppc) and Keychain
  • Previous by thread: osascript and *.command files
  • Next by thread: Re: osascript and *.command files
  • Index(es):
    • Date
    • Thread