wtf i sp4nk is right. It's a duplicate identifier, that means there is more than 1 label1. Just change all the label1s to something else.
You had a bunch of duplicate identifiers when you included squig, try SRL next time, you will get a lot less duplicate identifiers.
Here is your code and this works.
Code:
program autologin;
{.include squig.txt}
var
frmDesign : TForm;
CheckBox1 : TCheckBox;
const
username='lol';
password='lol';
procedure login2;
begin
wait(2000)
MouseC(294+random(246),253+random(5),1);
clickmouse (467,296,true)
wait(1000)
SendKeysHuman (Username) //Username
wait(1000)
MouseC(296+random(241),268+random(5),1);
clickmouse (386,273,true)
SendKeysHuman (Password) //Password
wait(1000)
MouseC(231+random(142),303+random(35),1);
end;
procedure buttonclick(sender: TObject);
begin
writeln('starting')
frmDesign.Caption:= frmDesign.Caption + '.';
frmDesign.ModalResult:= mrOk;
login2;
end;
procedure initform2;
var
Label1,Label2 : TLabel;
Button1 : TButton;
begin
frmDesign := CreateForm;
frmDesign.Left := 250;
frmDesign.Top := 114;
frmDesign.Width := 235;
frmDesign.Height := 223;
frmDesign.Caption := 'Auto-Login V1.0';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 44;
Label1.Top := 23;
Label1.Width := 109;
Label1.Height := 13;
Label1.Caption := 'Lacky'#39's Auto-Login';
Label1.Font.Color := clWindowText;
Label1.Font.Height := -11;
Label1.Font.Name := 'MS Sans Serif';
Label1.Font.Style := [fsBold];
Label1.ParentFont := False;
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 21;
Label2.Top := 60;
Label2.Width := 161;
Label2.Height := 13;
Label2.Caption := 'Do you want to auto-login??';
Label2.Font.Color := clWindowText;
Label2.Font.Height := -11;
Label2.Font.Name := 'MS Sans Serif';
Label2.Font.Style := [fsBold];
Label2.ParentFont := False;
CheckBox1 := TCheckBox.Create(frmDesign);
CheckBox1.Parent := frmDesign;
CheckBox1.Left := 192;
CheckBox1.Top := 60;
CheckBox1.Width := 20;
CheckBox1.Height := 16;
CheckBox1.TabOrder := 8;
Button1 := TButton.Create(frmDesign);
Button1.Parent := frmDesign;
Button1.OnClick := @buttonclick
Button1.Left := 88;
Button1.Top := 127;
Button1.Width := 75;
Button1.Height := 25;
Button1.Caption := 'Start';
Button1.TabOrder := 9;
end;
procedure SafeInitForm2;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm2', v);
end;
procedure ShowFormModal2;
begin
frmDesign.ShowModal;
end;
procedure SafeShowFormModal2;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal2', v);
end;
begin
ClearDebug;
SafeInitForm2;
SafeShowFormModal2;
FreeForm(frmDesign);
end.
~Ron