Iamadam
2011-03-02 21:16:12
Heya.
I want to launch a java application from an extension in Simba.
Simba doesn't include the CMD library (has the exec procedure), so I made a dll with the function I need.
The dll works fine in a normal script, but the second I try to load it in an extension, it won't compile.
Any ideas?
Here's extension code:
I want to launch a java application from an extension in Simba.
Simba doesn't include the CMD library (has the exec procedure), so I made a dll with the function I need.
The dll works fine in a normal script, but the second I try to load it in an extension, it won't compile.
Any ideas?
Here's extension code:
program Zazu;
{$LOADLIB executor.dll}
function openZazu : boolean;
begin
writeln('Trying to execute...');
Execute('java', pluginPath + '\zazu.jar');
end;
procedure onClick(Sender: TObject);
begin
if (not (fileExists(includePath + 'SRL\SRL\core\SPS\worldmap.bmp'))) then
begin
writeln('World map not found. Is SPS installed??');
Exit;
end;
WriteLn('Opening Zazu...');
if(openZazu) then
writeln('Zazu opened')
else
writeln('Zazu couldn''t be opened');
end;
procedure init;
var
simbaMenu : TMenuItem;
begin
simbaMenu := TMenuItem.create(Simba_MainMenu);
simbaMenu.caption := 'Run Zazu';
simbaMenu.onClick := @onClick;
simba_MainMenu.items.items[4].insert(Simba_MainMenu.Items.Items[4].count, SimbaMenu);
end;
function getName: string;
begin
Result := 'Zazu Launcher';
end;
function getVersion: string;
begin
Result := '1.0';
end; Obviously it's not quite finished, but yeah - why won't it load the library?