|
||||||||||||||||||||||||
Using JavaScript OSA From REALbasicREALbasic is a Rapid Appliction Development environment that uses the BASIC programming language. This page describes how to use JavaScript OSA from REALbasic. Using JavaScript from REALbasic is almost identical to using AppleScript. To imbed a simple script into a real basic project, do the following:
Passing parameters to JavaScript code is a little more complicated. Firstly you have to declare an AppleEvent handler in your JavaScript code that handles the AppleEvent REALbasic sends.
Save this script as a compiled script and import it into your REALbasic project. Once this is done, you can invoke the handler in the following way:
Thats it! Note that as with AppleScript, REALbasic converts the result of the script to a string, so you may want to do that conversion within your JavaScript code before returning to REALbasic.
|
||||||||||||||||||||||||