I made a form that opens and it has a button and a space where you can enter your text. If i write in something then click the button scar closes along with SMART. Also the thing you wrote will only work when i call the procedure :(
edit - Read line causes the script to freeze for me
edit2 -
program New;
{.Include SRL/SRL.scar}
var
frmDesign: TForm;
Edit1: TEdit;
Button1: TButton;
Procedure ButtonClick(Sender: TObject);
Begin
Typesend(''+ Edit1.Text);
End;
procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 1;
frmDesign.Top := 1;
frmDesign.Width := 350;
frmDesign.Height := 75;
frmDesign.Caption := 'Message Box';
frmDesign.Color := ClWhite;
Button1 := TButton.Create(FrmDesign);
Button1.Parent := FrmDesign;
Button1.Left := 265;
Button1.Top := 10;
Button1.Height := 20;
Button1.Width := 50;
Button1.Caption := 'Send';
Button1.OnClick := @ButtonClick;
Edit1 := TEdit.Create(FrmDesign);
Edit1.Parent := FrmDesign;
Edit1.Top := 10;
Edit1.Left := 10;
Edit1.Width := 250;
Edit1.Height := 20;
end;
procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;
procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;
begin
SetupSRL;
SafeInitForm;
SafeShowFormModal;
end.
Also while the text box is open my script will come to a stand still until the box is closed.. im unsure what to do