# unqlite.script 库模块帮助文档

## unqliteJx9Object 成员列表 <a id="unqliteJx9Object" href="#unqliteJx9Object">&#x23;</a>

### unqliteJx9Object.configErrLog() <a id="unqliteJx9Object.configErrLog" href="#unqliteJx9Object.configErrLog">&#x23;</a>
返回错误信息

### unqliteJx9Object.configImportPath("搜索路径") <a id="unqliteJx9Object.configImportPath" href="#unqliteJx9Object.configImportPath">&#x23;</a>
设置include,import搜索路径  
默认为应用程序目录

### unqliteJx9Object.configOutput(回调函数) <a id="unqliteJx9Object.configOutput" href="#unqliteJx9Object.configOutput">&#x23;</a>

```aardio
unqliteJx9Object.configOutput( function( output ){  
	io.print( "脚本输出", output )  
} )
```

### unqliteJx9Object.context() <a id="unqliteJx9Object.context" href="#unqliteJx9Object.context">&#x23;</a>
[返回对象:unqliteJx9contextObject](#unqliteJx9contextObject)

### unqliteJx9Object.context(pCtx) <a id="unqliteJx9Object.context" href="#unqliteJx9Object.context">&#x23;</a>
用于自定义函数中创建context对象

### unqliteJx9Object.createFunction(函数名,回调函数) <a id="unqliteJx9Object.createFunction" href="#unqliteJx9Object.createFunction">&#x23;</a>

```aardio
unqliteJx9Object.createFunction("/*指定函数名*/",function(pCtx,...){  
	var ctx = unqliteJx9Object.context(pCtx);  

} )
```

### unqliteJx9Object.deleteFunction("函数名") <a id="unqliteJx9Object.deleteFunction" href="#unqliteJx9Object.deleteFunction">&#x23;</a>
删除自定义函数

### unqliteJx9Object.exec() <a id="unqliteJx9Object.exec" href="#unqliteJx9Object.exec">&#x23;</a>
执行脚本

### unqliteJx9Object.extractVariable("变量名") <a id="unqliteJx9Object.extractVariable" href="#unqliteJx9Object.extractVariable">&#x23;</a>
获取变量的值

### unqliteJx9Object.release() <a id="unqliteJx9Object.release" href="#unqliteJx9Object.release">&#x23;</a>
关闭虚拟机

### unqliteJx9Object.reset() <a id="unqliteJx9Object.reset" href="#unqliteJx9Object.reset">&#x23;</a>
重置

## unqliteJx9contextObject 成员列表 <a id="unqliteJx9contextObject" href="#unqliteJx9contextObject">&#x23;</a>

### unqliteJx9contextObject.functionName() <a id="unqliteJx9contextObject.functionName" href="#unqliteJx9contextObject.functionName">&#x23;</a>
返回当前函数名

### unqliteJx9contextObject.print("信息", ... ) <a id="unqliteJx9contextObject.print" href="#unqliteJx9contextObject.print">&#x23;</a>
用于输出信息,  
等价于在Jx9脚本中调用print函数

### unqliteJx9contextObject.rand() <a id="unqliteJx9contextObject.rand" href="#unqliteJx9contextObject.rand">&#x23;</a>
返回随机数

### unqliteJx9contextObject.randStr(长度) <a id="unqliteJx9contextObject.randStr" href="#unqliteJx9contextObject.randStr">&#x23;</a>
返回随机字符串

### unqliteJx9contextObject.throwError("错误信息",错误代码 ) <a id="unqliteJx9contextObject.throwError" href="#unqliteJx9contextObject.throwError">&#x23;</a>
抛出Jx9脚本异常,  
参数2以 _SXERR_ 前缀常量指定错误代码
