• 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: Skeeve <email@hidden>
  • Date: Thu, 05 Feb 2009 18:07:36 +0100

Michelle Steiner schrieb:
On Feb 5, 2009, at 9:44 AM, Skeeve wrote:

set rubyScript to "linktunes.rb"
set scriptPath to (POSIX path of (path to me)) & "/../" & rubyScript
set scriptPath to (POSIX file scriptPath) as string
set scriptPath to POSIX path of scriptPath

And that's better than this?
set rubyScript to "linktunes.rb"
set text item delimiters to {":"}
set scriptPath to ((text items 1 through -2 of (path to me as text)) as text) & rubyScript
depends.
1) You need not depend on ":" being the path delimiter
2) You need not set and reset(!) the text item delimiters
3) You can do it in one line (if you wwant to)

set scriptPath to POSIX path of (get (POSIX file ((POSIX path of path to me) & "/../" & rubyScript)) as string)

_______________________________________________
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: Finding and shelling out to a sh script in the same directory as the AppleScript
      • From: Skeeve <email@hidden>
References: 
 >Finding and shelling out to a sh script in the same directory as the AppleScript (From: elliottcable <email@hidden>)
 >Re: Finding and shelling out to a sh script in the same directory as the AppleScript (From: Luther Fuller <email@hidden>)
 >Re: Finding and shelling out to a sh script in the same directory as the AppleScript (From: "Mark J. Reed" <email@hidden>)
 >Re: Finding and shelling out to a sh script in the same directory as the AppleScript (From: Michelle Steiner <email@hidden>)
 >Re: Finding and shelling out to a sh script in the same directory as the AppleScript (From: Skeeve <email@hidden>)
 >Re: Finding and shelling out to a sh script in the same directory as the AppleScript (From: Michelle Steiner <email@hidden>)
 >Re: Finding and shelling out to a sh script in the same directory as the AppleScript (From: Skeeve <email@hidden>)
 >Re: Finding and shelling out to a sh script in the same directory as the AppleScript (From: Michelle Steiner <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: Finding and shelling out to a sh script in the same directory as the AppleScript
  • Previous by thread: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
  • Next by thread: Re: Finding and shelling out to a sh script in the same directory as the AppleScript
  • Index(es):
    • Date
    • Thread