Results 1 to 4 of 4

Thread: rele rele annyoed

  1. #1
    Join Date
    Dec 2006
    Location
    UK!!
    Posts
    910
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default rele rele annyoed

    wat is wrong with label1??? in this simple autologin script??? i know the actual login thing is bad but i dont care about that its the form i want to get to work!! so for now ignore the login bit but can u get the script to run the form then when start is click itstarts the login pls pls pls

    SCAR Code:
    program autologin;
    {.include squig.txt}

      var
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      CheckBox1 : TCheckBox;
      Button1 : TButton;
     
      const
      username='lol';
      password='lol';
     
        procedure login;
    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;
      login;
    end;
     
      procedure initform;
      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 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
      SafeInitForm;
      SafeShowFormModal;
      end.

    ty

  2. #2
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try removing the include thier could eb another label one in that whihc is stoping ur script and i removed the include and the procedure that required the include and it worked fine and aslo try using SRL

  3. #3
    Join Date
    Apr 2006
    Location
    I live in NH
    Posts
    611
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    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

  4. #4
    Join Date
    Nov 2006
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    [QUOTE=Ron;50141]
    You had a bunch of duplicate identifiers when you included squig, try SRL next time, you will get a lot less duplicate identifiers.

    srl is better anyways...
    Infractions, reputation, reflection, the dark side of scripting, they are.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •