L3DT documentation
Large 3D terrain generator



Run a script string.

Supported script languages currently include Python (via cdPython plugin) and ZeoScript (via ZeoScript plugin).

Function prototype

bool CExtAPI::script_Execute(const char* lpLangName, const char* lpScript, ZVAR hRval);


Name Type Comment
lpLangName const char* A handle to a C-style string identifying the script language. Accepted values are “py” for Python, and “zs” for ZeoScript.
lpScript const char* A handle to a C-style string containing the script string to be run.
hRval ZVAR A variable handle to receive the return value of the script.

Return value

False if an error occurred, and true otherwise.


Running a ZeoScript

The following example runs a ZeoScript to open a “save file as…” dialog (using the 'file.SaveDlg' extension function), and stores the return value in the FileName string variable:

CzStr FileName; 
theAPI.script_Execute("zs", "file.SaveDlg bmp NULL \"Bitmap image (*.bmp)|*.bmp|\"", (ZVAR)FileName);


Script return values

At the time of writing1), only the ZeoScript plugins supports the setting of the hRval return value.

1) 2007/04/16 21:05
zeolite/functions/script_execute.txt · Last modified: 2017/08/31 06:10 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki