1 (edited by jihem 2018-12-17 23:10:41)

Topic: Execute LUA code from MVD

You can do a lot of tricks with DynamicWrapperX :-)


Click the link to download a 32bit lua dll here :
https://freefr.dl.sourceforge.net/proje … w4_lib.zip

About DynamicWrapperX :
http://www.script-coding.com/dynwrapx_eng.html

function dll:variant;
    var DW:variant;
begin
    DW := CreateOleObject('DynamicWrapperX');
    DW.Register('lua53.dll', 'luaL_newstate', 'r=l');
    DW.Register('lua53.dll', 'luaL_openlibs', 'i=l');
    DW.Register('lua53.dll', 'luaL_loadstring', 'i=ls');
    DW.Register('lua53.dll', 'lua_callk', 'i=luull');
    DW.Register('lua53.dll', 'lua_close', 'i=l');
    result := dw;
    DW := nil;
end;

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
    l:LongInt;
begin
    l:=dll.luaL_newstate();
    dll.luaL_openlibs(l);
    dll.luaL_loadstring(l,'file = io.open("test.txt", "a");file:write("hello")');
    dll.lua_callk(l, 0, 0, 0, 0);
    dll.lua_close(l);

end;

begin
  Form1.mniFile.Visible := False;
  Form1.mniOptions.Visible := False;
  Form1.mniSettings.Visible := False;
  Form1.mniReport.Visible := False;
  Form1.mniAbout.Visible := False;
end.
while(! success=retry());
https://jihem.itch.io

Re: Execute LUA code from MVD

Hi,
Thanks for the advice. I will have a look on it.
Regards,
jihem

while(! success=retry());
https://jihem.itch.io

Re: Execute LUA code from MVD

Hello Everybody,
can i get sample gammu sms gateway with MVD ??
Thanks you verry much