<< Click to Display Table of Contents >> Navigation: Executing script > Calling script function |
Any script function can be called from Delphi code.
Example:
t := Script.RunFunction('MyFunc', [1, 'test']);
For faster calling you can get reference to a function and call it via reference:
var SF: TScriptFunc;
begin
SF := Script.FindFunction('MyFunc');
if Assigned(SF) then
t := Script.RunFunction(SF, [1, 'test'])
else
ShowMessage('Function not found');
end;