P
Phrogz
Are you a Macintosh scripter who hoped that the title of this message
was an announcement? If so, you're not alone! (I mean, I know that at
least *I* want this.)
For those who don't know: Apple's scripting architecture used by
AppleScript is actually sort of like .NET - there's an "Open Scripting
Architecture" at the core that theoretically allows you do use
different scripting languages (such as "French Applescript" or
JavaScript[1]).
If someone writes an OSA plugin for a particular language, all the
automation capabilities exposed to "AppleScript" by all the various
applications under Mac OS are available to that new language. The
"Script Editor" application that comes with Mac OS supports[2] the new
language.
I'm sure I'll never finish it, but the point of this post is to find
out if anyone smarter than me knows about Ruby and OSA, and knows what
it would take to at least START a Ruby OSA.
Because, as you know, Ruby rocks. AppleScript "rocks" insofar as so
many apps are AppleScriptable, but it's a terrible language. I mean,
why does this work:
copy (get songling's location) to trackpath
tell application "Finder" to duplicate trackpath to destination
but this doesn't:
tell application "Finder" to duplicate (get songling's location) to
destination
?!
I'd much rather write:
Applications[ "Finder" ].duplicate( songling.location, destination )
or perhaps
songling.location.duplicate( :to => destination )
So, anyone got any idea where to start on a project like this? Or have
any reasons why it's totally useless to attempt?
[1] http://www.latenightsw.com/freeware/JavaScriptOSA/index.html
[2] Syntax coloring doesn't seem to come for free, however.
was an announcement? If so, you're not alone! (I mean, I know that at
least *I* want this.)
For those who don't know: Apple's scripting architecture used by
AppleScript is actually sort of like .NET - there's an "Open Scripting
Architecture" at the core that theoretically allows you do use
different scripting languages (such as "French Applescript" or
JavaScript[1]).
If someone writes an OSA plugin for a particular language, all the
automation capabilities exposed to "AppleScript" by all the various
applications under Mac OS are available to that new language. The
"Script Editor" application that comes with Mac OS supports[2] the new
language.
I'm sure I'll never finish it, but the point of this post is to find
out if anyone smarter than me knows about Ruby and OSA, and knows what
it would take to at least START a Ruby OSA.
Because, as you know, Ruby rocks. AppleScript "rocks" insofar as so
many apps are AppleScriptable, but it's a terrible language. I mean,
why does this work:
copy (get songling's location) to trackpath
tell application "Finder" to duplicate trackpath to destination
but this doesn't:
tell application "Finder" to duplicate (get songling's location) to
destination
?!
I'd much rather write:
Applications[ "Finder" ].duplicate( songling.location, destination )
or perhaps
songling.location.duplicate( :to => destination )
So, anyone got any idea where to start on a project like this? Or have
any reasons why it's totally useless to attempt?
[1] http://www.latenightsw.com/freeware/JavaScriptOSA/index.html
[2] Syntax coloring doesn't seem to come for free, however.