JavaScript OSA
From Wikipedia, the free encyclopedia
This article does not cite any references or sources. (April 2008) Please help improve this article by adding citations to reliable sources. Unverifiable material may be challenged and removed. |
JavaScript OSA, (originally JavaScript for OSA, abbreviated as JSOSA), is a freeware inter-process communication scripting language for the Macintosh computer.
JavaScript OSA uses the "core language" of the Mozilla implementation of the JavaScript programming language, (see SpiderMonkey). The language is used as an alternative to the AppleScript language. Its use is unrelated to web browser-based scripting. It can be seen as having a similar function to Microsoft's JScript .NET language on Windows machines, although there is no interoperability between the two languages' system-level scripting.
[edit] Description
The language is identical to Mozilla's core language, with extensions added via a "Core" object and a "MacOS" object. The MacOS object has methods for obtaining objects that are bound to applications. This is done via the AppleEvent messaging system, a part of the Macintosh's Open Scripting Architecture.
The language was first released in 2001, and was bundled with Late Night Software's flagship product, Script Debugger. In May of 2005, a new "alpha" version of the language was made available for testing. This improved second version of the language was bundled with version 4 of Script Debugger.
[edit] Criticism
As of March, 2006, JSOSA is missing some features that AppleScript supports. These include:
- Support for object-filtering, referred to in AppleScript as support for the "whose clause".
- Support for sending AppleEvents without waiting for replies, accomplished in AppleScript with an "ignoring application responses" statement. In fact, JSOSA does support this with the sendAENoReply method of application objects, but this requires the user to construct a "raw" AppleEvent.
- A number of terminology bugs under Mac OS X and the 2.0 version of the interpreter.
In responding to why JSOSA "didn't take off", creator Mark Alldritt provided this list of reasons [1]:
- AppleScript is good enough for most folks
- users must install JSOSA before they can run scripts while AppleScript is bundled with the OS
- Apple's less than whole hearted support for OSA (e.g. Apple's Script Editor gets a little unstable when using anything other than AppleScript, AppleScript Studio is AppleScript centric when it could/should be OSA centric)
- my support/promotion of JSOSA has not been successful
- my unwillingness to make JSOSA Open Source
- more attractive alternatives (AppleEvent hooks for Perl, Python and Ruby)
[edit] External links
- Late Night Software
- Current release version of JavaScript OSA
- An "alpha" release of JSOSA, version 2.0
|