• 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: Finding and shelling out to a sh script in the same directory as the AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding and shelling out to a sh script in the same directory as the AppleScript


  • Subject: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
  • From: has <email@hidden>
  • Date: Thu, 5 Feb 2009 18:37:08 +0000

elliottcable wrote:

I have an AppleScript to be used in an AppleScript-using application
(Adium), and I don't have any other options for usage. My goal is to
create the simplest AppleScript possible that will do nothing more
than 'farm out' to a Ruby script in the same directory as the
AppleScript.


do shell script "ruby \"`dirname " & quoted form of (POSIX path of (path to me)) & "`/linktunes.rb\""

Main caveat to be aware of is that 'path to me' does not work in all situations - it depends on the OS version, the application running the script, and won't work at all when compiling scripts.

HTH

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________
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
  • Prev by Date: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
  • Next by Date: Re: Simple AS question (BBEdit)
  • Previous by thread: Re: Simple AS question (BBEdit)
  • Next by thread: Re: Finding and shelling out to a sh script in the same
  • Index(es):
    • Date
    • Thread