[Home] [Download] [Documentation] [Discussion Forum] [Jin at SourceForge] [Contribute]

Variables available to scripts

These are predefined functions that BeanShell scripts can use directly. Of course, they are also free to use the entire Java API and any of Jin's classes/methods. The latter, however, are not guaranteed to keep existing/working between various versions of Jin.

sendCommand(String command)
Sends the specified command/message to the server.
playSound(String path)
Attempts to play the sound file at the specified path. Note that JDK 1.1 supports playing only 8KHz mono 8-bit mu-Law-encoded .au files. JDK1.2 and newer support playing wav's. You can try other formats - they may or may not work. Also note that when specifying the filename on Windows, you need to type the backslash twice, like so: playSound("C:\\tmp\\mysoundfile.wav")
exec(String command)
Executes the specified command in the operating system. Calling exec("notepad") on Windows, for example, will open the notepad application.
appendLine(String line)
Appends the specified line to Jin's main console. The color of the text is specified by the "Special" type in the console preferences.