• 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: do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script


  • Subject: Re: do shell script
  • From: Walter Ian Kaye <email@hidden>
  • Date: Mon, 20 Oct 2003 17:20:19 -0700

At 09:04a +1000 10/21/2003, Ian Mcginley - Systems Support Engineer didst inscribe upon an electronic papyrus:

do shell script "./MyProggy.app/Contents/Resources/jstart.bash"

When I run the application (MyProggy.app) from /Applications and I click on my ok button I get the error:

AppleScript Error
sh: ./MyProggy.app/Contents/Resources/jstart.bash:
No such file or directory (127)

Is there a way I can test for what directory my Application is running from with Applescript? I haven't been able to find an example of that one.

tell application "Finder"
set p to application file id "com.sun.myproggy" as alias
end tell
set s to (posix path of p) & "Contents/Resources/jstart.bash"
do shell script (quoted form of s)

You can use either the 4-char creator code or the bundle identifier.


cheers,
-boo
_______________________________________________
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.

References: 
 >do shell script (From: Ian Mcginley - Systems Support Engineer <email@hidden>)

  • Prev by Date: Re: Scripting CLI apps
  • Next by Date: Fwd: do shell script
  • Previous by thread: do shell script
  • Next by thread: Fwd: do shell script
  • Index(es):
    • Date
    • Thread