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

osascript and *.command files


  • Subject: osascript and *.command files
  • From: Thomas Treichl <email@hidden>
  • Date: Sun, 07 Oct 2007 11:18:18 +0200

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, 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?

  Thomas
_______________________________________________
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: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Creating shapes in Illustrator [solved]
  • Next by Date: Re: Scripting InDesign Tables
  • Previous by thread: Re: Creating shapes in Illustrator [solved]
  • Next by thread: Re: osascript and *.command files
  • Index(es):
    • Date
    • Thread