public class ScriptInterpreter extends Object
Constructor and Description |
---|
ScriptInterpreter(AIMSession sess,
AIMConnection conn,
Oscar oscar)
Creates a new script interpreter.
|
Modifier and Type | Method and Description |
---|---|
void |
addScript(Script script)
Add a script.
|
void |
addTimeoutHandler(Script script,
int time,
boolean forever,
String code)
Add a timeout handler for a script.
|
void |
executeScriptFile(String filename)
Executes a script file.
|
ArrayList |
getScripts()
Return the value of scripts.
|
public ScriptInterpreter(AIMSession sess, AIMConnection conn, Oscar oscar)
sess
- the oscar sessionconn
- the bos connection for this sessionoscar
- the oscar interface for this clientpublic void executeScriptFile(String filename)
filename
- the script filepublic void addTimeoutHandler(Script script, int time, boolean forever, String code)
script
- the scripttime
- the time in millisecondsforever
- whether or not to repeat forevercode
- the code to execute when the timeout occurspublic void addScript(Script script)
script
- the script to addpublic ArrayList getScripts()