Re: Running ruby (utilizing appscript) from do shell script
Re: Running ruby (utilizing appscript) from do shell script
- Subject: Re: Running ruby (utilizing appscript) from do shell script
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 4 Jun 2008 11:28:52 -0400
On Wed, Jun 4, 2008 at 10:45 AM, James Nierodzik
<email@hidden> wrote:
> The answer to your first question was simply curiosity. I wanted to see if
> I could and how I would go about doing it. Does it have
> a real world practical application? Probably not, but I just wanted to see
> how it would work =)
Fair enough. :)
> To address the the first question again though... what about in the case of
> a droplet? You want to utilize droplet type functionality, but
> leverage something within ruby/appscript for some reason?
Sure, it makes sense to create an AS droplet that then uses some other
tool to get stuff done - but I would still make the other tool's
script separate from the AS code. For instance, you could package the
droplet as an application and include the Ruby script (or whatever)
within the bundle, and just run it with the pathnames of whatever's
dropped as arguments. Passing long programs on the command line via
"do shell script" is fragile and error-prone.
There's an example here, though it uses the Python version of
appscript instead of the Ruby one:
http://joyofscripting.com/wp/?p=172
--
Mark J. Reed <email@hidden>
_______________________________________________
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