ibesScriptSetCallback

Sets a specified callback function for a script object.

Syntax

 function ibesScriptSetCallback(AScript : THandle; AFunctionID : integer; AFunc : pointer) : integer;

AScript is a valid handle to a scripter object created with the ibesScriptInit function. AFunctionID is an identifier of a callback function, see IBEScriptIntf.pas and the demo application for a list of supported callback functions and their identifiers. AFunc is a pointer to a callback function.

This function returns 0 (zero) if it succeeds, otherwise it returns a non-zero value.

All IBEScript.dll interface & callback functions provide ABlockName argument which contains the name of the block if execution of that block was initiated as below:

 EXECUTE IBEBLOCK MYBLOCK ...

If block name is missing ABlockName parameter will contain an empty string.