====== script_Execute ======
===== Description =====
Run a script string.
Supported script languages currently include Python (via [[bundywiki>plugins:general:cdPython|cdPython plugin]]) and ZeoScript (via [[bundywiki>plugins:general:ZeoScript|ZeoScript plugin]]).
===== Function prototype =====
bool CExtAPI::script_Execute(const char* lpLangName, const char* lpScript, ZVAR hRval);
===== Arguments =====
^ 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.
===== Examples =====
==== 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);
===== Comments =====
==== Script return values ====
At the time of writing((2007/04/16 21:05)), only the ZeoScript plugins supports the setting of the //hRval// return value.