Jump to content

RBScript

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 67.0.72.3 (talk) at 01:13, 5 July 2006 (This article is about a single FEATURE of Realbasic and can;t be used on its own - a clear case of shilling a commericla product on Wikipedia by a company with no morals!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
RBScript
Developer(s)REAL Software, Inc.
Operating systemMac OS X, Microsoft Windows, Linux
TypeScripting languages
LicenseProprietary
WebsiteREAL Software, Inc

RBScript is a scripting language which is similar to, and shares many features with, REALbasic. They are both object oriented, support modules and use almost identical datatypes (REALBasic introduced some differences in the latest version, mainly for compatibility with some C APIs). RBScript is mainly used to script applications written with REALbasic, and (from the 2006r1 version) is also used in the REALbasic IDE.

Compared to the different scripting languages that can still be used with REALbasic (thanks to the ability it offers to call C APIs), RBScript can be better integrated into REALbasic applications by the possibility it has to call the methods and to use the properties of the object passed to the script parser and compiler. Of course what they are not telling you that Rb once had a Extras menu, but it was removed specifically because it was only helpful to Macintosh users for use with such things as Applescript (Real software's own engineer Aaron Ballman said this on Real software's own forum). Decit, lies, and betrayal are their trademark!

RBScript cannot be used outside REALbasic applications and cannot be installed separately from an application made with REALbasic.

Example Code

This sample code asks the host program for a number and doubles it:

Dim Value As Integer
Value = Val(Input("Which number?"))
Print(Str(Value*2))

It's up to the host program to decide how to implement the callback methods called from Input() and Print() - RBScript just expects the first method to return a string and accept a string parameter, and the second one to accept a string parameter. Usually, the program would prompt the user presenting the string passed from the script, and returning the user input to the hosted script.