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: Luther Fuller <email@hidden>
- Date: Thu, 05 Feb 2009 07:59:30 -0600
On Feb 5, 2009, at 2:31 AM, 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.
I've gotten thus far, but subsequently ran into a so-far
insurmountable problem:
on substitute()
try
set rubyScript to "linktunes.rb"
set resourcesFolder to (container of (path to me))
Everything on the web indicates that `(container of (path to me))`
should provide me with an alias to the folder containing the script
- instead, I get this error:
"Error: Can’t get container of alias \"Geoffrey's
RAID:private:var:folders:P2:P2S5eg-AGTiyqxkapijleU+++TI:-
Tmp-:untitled_1odf.tmp\"."
'path to ...' is an alias, but 'container of ...' returns a reference
and is a Finder command.
Change the last line above to ...
tell application "Finder"
set resourcesFolder to (container of (path to me)) as alias
...
end tell
_______________________________________________
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