- JavaScript OSA
JavaScript OSA, (originally "JavaScript for OSA", abbreviated as "JSOSA"), is a
freeware inter-process communication scripting language for theMacintosh computer .JavaScript OSA uses the "core language" of the
Mozilla implementation of theJavaScript programming language , (seeSpiderMonkey ). The language is used as an alternative to theAppleScript language. Its use is unrelated toweb browser -based scripting. It can be seen as having a similar function toMicrosoft 'sJScript .NET language on Windows machines, although there is no interoperability between the two languages' system-level scripting.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 withLate Night Software 's flagship product,Script Debugger . In May of2005 , 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.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 [http://tech.groups.yahoo.com/group/jsosa/message/521] :
* 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 forPerl , Python and Ruby)External links
* [http://www.latenightsw.com Late Night Software]
* [http://www.latenightsw.com/freeware/JavaScriptOSA/index.html Current release version of JavaScript OSA]
* [http://www.latenightsw.com/freeware/JavaScriptOSA/jsosa2.html An "alpha" release of JSOSA, version 2.0]
Wikimedia Foundation. 2010.