Re: Invoke Unix Tool in Script Application Bundle
Re: Invoke Unix Tool in Script Application Bundle
- Subject: Re: Invoke Unix Tool in Script Application Bundle
- From: Luther Fuller <email@hidden>
- Date: Fri, 3 Oct 2008 06:32:01 -0500
On Oct 2, 2008, at 7:53 PM, Jerry Krinock wrote:
I need to write a unix program ("command line tool") in C/Cocoa/
Carbon to access some API that are not available in AppleScript.
(Specifically, I need to parse and decode a base-64 encoded File
Alias that is stored in a file, and convert it to a unix path.) I
want to ship this tool inside an AppleScript application package, so
that my user only gets one package to doubleclick and run.
So, here's what I plan to do: Save script as application bundle,
put the tool in the bundle's Contents/MacOS. In the script, run the
tool with something like
set toolPath to ((POSIX path of (path to me)) as string) & "/
Contents/MacOS/" & toolName
do shell script toolPath & arguments, ... etc.
I'd appreciate hearing from anyone who has tried anything like this,
and/or can suggest a better way, before I dig myself in too deeply.
I do it all the time. It just works.
_______________________________________________
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