Re: Finding and shelling out to a sh script in the same directory as the AppleScript
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: Michelle Steiner <email@hidden>
- Date: Thu, 5 Feb 2009 09:20:55 -0700
On Feb 5, 2009, at 9:06 AM, Skeeve wrote:
set text item delimiters to {":"}
set resourcesFolder to (text items 1 through -2 of (path to me as
text)) as text
We can do it without text manipulation
Here split up into 3 steps to illustrate what's going on
-- Make it a POSIX path using ".." (Parent Directory)
set scriptPath to (POSIX path of (path to me)) & "../" & rubyScript
-- Make it an alias and then a string
set scriptPath to (POSIX file scriptPath) as string
-- convert it to a POSIX Path
set scriptPath to POSIX path of scriptPath
I do not see where it gets the container of the script file.
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
--> "/Users/michelle/Desktop/a test script.scpt../linktunes.rb"
-- Michelle
--
"If you don't preach in my school I won't think in your church"
_______________________________________________
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