is there anyway to interact between the extensions and the script without ini files?, otherwise it could be hard
~shut
EDIT: or have something in SRL which is called regularly which can check the ini file, but then how would it know which simba its meant for…?
EDIT: nice and simple
this goes somewhere where it will be called a lot in SRL
procedure WriteSMART;
begin
if StrToBool(ReadINI('Changed', 'Changed', IncludePath+'SRL/SRL/SmartSendLine.INI')) then
begin
WriteINI('Changed', 'Changed', 'False', IncludePath+'SRL/SRL/SmartSendLine.INI');
TypeSend(ReadINI('SMART', 'SMART', IncludePath+'SRL/SRL/SmartSendLine.INI'));
end;
end;
and this is an extension
program SMARTTalker;
var
MainMenuItem, MenuSMARTForm: TMenuItem;
procedure SMARTReadLine(Sender: TObject);
var
TheLine: string;
begin
TheLine:= ReadLn('What to type?');
if (Length(TheLine) > 0) then
begin
WriteINI('Changed', 'Changed', 'True', IncludePath+'SRL/SRL/SmartSendLine.INI');
WriteINI('SMART', 'SMART', TheLine, IncludePath+'SRL/SRL/SmartSendLine.INI');
end;
end;
procedure Init;
begin;
MainMenuItem := TMenuItem.Create(Simba_MainMenu);
MainMenuItem.Caption := 'SMART';
Simba_MainMenu.Items.Add(MainMenuItem);
MenuSMARTForm := TMenuItem.Create(MainMenuItem);
MenuSMARTForm.Caption := 'Type Line';
MenuSMARTForm.OnClick := @SMARTReadLine;
MainMenuItem.Add(MenuSMARTForm);
end;
procedure Free;
begin
end;
procedure Attach;
begin;
end;
Procedure Detach;
begin
end;
function GetName : string;
begin;
result := 'SMART Talker';
end;
function GetVersion : string;
begin;
result := '1.0';
end;
begin
end.
the reason for INI files is because i havent found any way (other than INI files) to interact between extensions and scripts