Results 1 to 10 of 10

Thread: Help with using infromation from forms into script.

  1. #1
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default Help with using infromation from forms into script.

    SCAR Code:
    var
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      Label4 : TLabel;
      GroupBox1 : TGroupBox;
      UserNameOne: TEdit;
      PassWordOne: TEdit;
      Edit1 : TEdit;
      GroupBox2 : TGroupBox;
      Label3 : TLabel;
      Label5 : TLabel;
      Label6 : TLabel;
      UserNameTwo: TEdit;
      Edit2 : TEdit;
      PassWordTwo: TEdit;
      Button1 : TButton;
      Username, Password : String;

    procedure StartClick(sender: TObject);
    begin
      Username := UserNameOne.Text;
      Password := PassWordTwo.Text;
      WriteLn('Username1 = ' + Username);
      Writeln('Password1= ' + Password);
      Username := UserNameTwo.Text;
      Password := PassWordTwo.Text;
      WriteLn('Username2 = ' + Username);
      Writeln('Password2 = ' + Password);
      frmDesign.ModalResult:= mrOk;
    end;

    procedure Form;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 252;
    frmDesign.Top := 141;
    frmDesign.Width := 391;
    frmDesign.Height := 291;
    frmDesign.Caption := '            Fally_Yewz.- By ->{Nauman}<-';
    frmDesign.Color := clBtnFace;
    frmDesign.Font.Color := clWindowText;
    frmDesign.Font.Height := -13;
    frmDesign.Font.Name := 'Constantia';
    frmDesign.Font.Style := [];
    frmDesign.Visible := False;
    frmDesign.PixelsPerInch := 96;
    Label1 := TLabel.Create(frmDesign);
    Label1.Parent := frmDesign;
    Label1.Left := 24;
    Label1.Top := 72;
    Label1.Width := 53;
    Label1.Height := 13;
    Label1.Caption := 'User Name';
    Label2 := TLabel.Create(frmDesign);
    Label2.Parent := frmDesign;
    Label2.Left := 24;
    Label2.Top := 96;
    Label2.Width := 53;
    Label2.Height := 13;
    Label2.Caption := 'PassWord';
    Label4 := TLabel.Create(frmDesign);
    Label4.Parent := frmDesign;
    Label4.Left := 24;
    Label4.Top := 136;
    Label4.Width := 68;
    Label4.Height := 13;
    Label4.Caption := 'Loads To Do?';
    GroupBox1 := TGroupBox.Create(frmDesign);
    GroupBox1.Parent := frmDesign;
    GroupBox1.Left := 8;
    GroupBox1.Top := 59;
    GroupBox1.Width := 177;
    GroupBox1.Height := 115;
    GroupBox1.Caption := 'Fally_Yews-Player One!';
    GroupBox1.TabOrder := 3;
     UserNameOne:= TEdit.Create(frmDesign);
    UserNameOne.Parent := frmDesign;
    UserNameOne.Left := 96;
    UserNameOne.Top := 72;
    UserNameOne.Width := 59;
    UserNameOne.Height := 21;
    UserNameOne.TabOrder := 0;
     PassWordOne:= TEdit.Create(frmDesign);
    PassWordOne.Parent := frmDesign;
    PassWordOne.Left := 96;
    PassWordOne.Top := 96;
    PassWordOne.Width := 59;
    PassWordOne.Height := 21;
    PassWordOne.TabOrder := 1;
    Edit1 := TEdit.Create(frmDesign);
    Edit1.Parent := frmDesign;
    Edit1.Left := 112;
    Edit1.Top := 136;
    Edit1.Width := 57;
    Edit1.Height := 21;
    Edit1.TabOrder := 2;
    GroupBox2 := TGroupBox.Create(frmDesign);
    GroupBox2.Parent := frmDesign;
    GroupBox2.Left := 200;
    GroupBox2.Top := 56;
    GroupBox2.Width := 177;
    GroupBox2.Height := 113;
    GroupBox2.Caption := 'Fally_Yewz- Player Two!!';
    GroupBox2.TabOrder := 4;
    Label3 := TLabel.Create(GroupBox2);
    Label3.Parent := GroupBox2;
    Label3.Left := 16;
    Label3.Top := 16;
    Label3.Width := 53;
    Label3.Height := 13;
    Label3.Caption := 'UserName';
    Label5 := TLabel.Create(GroupBox2);
    Label5.Parent := GroupBox2;
    Label5.Left := 16;
    Label5.Top := 40;
    Label5.Width := 59;
    Label5.Height := 13;
    Label5.Caption := 'PassWord';
    Label6 := TLabel.Create(GroupBox2);
    Label6.Parent := GroupBox2;
    Label6.Left := 16;
    Label6.Top := 80;
    Label6.Width := 68;
    Label6.Height := 13;
    Label6.Caption := 'Loads To Do?';
     UserNameTwo:= TEdit.Create(GroupBox2);
    UserNameTwo.Parent := GroupBox2;
    UserNameTwo.Left := 88;
    UserNameTwo.Top := 40;
    UserNameTwo.Width := 59;
    UserNameTwo.Height := 21;
    UserNameTwo.TabOrder := 0;
    Edit2 := TEdit.Create(GroupBox2);
    Edit2.Parent := GroupBox2;
    Edit2.Left := 96;
    Edit2.Top := 80;
    Edit2.Width := 65;
    Edit2.Height := 21;
    Edit2.TabOrder := 1;
     PassWordTwo:= TEdit.Create(frmDesign);
    PassWordTwo.Parent := frmDesign;
    PassWordTwo.Left := 288;
    PassWordTwo.Top := 72;
    PassWordTwo.Width := 59;
    PassWordTwo.Height := 21;
    PassWordTwo.TabOrder := 5;
    Button1 := TButton.Create(frmDesign);
    Button1.OnClick := @StartClick;
    Button1.Parent := frmDesign;
    Button1.Left := 80;
    Button1.Top := 200;
    Button1.Width := 177;
    Button1.Height := 25;
    Button1.Caption := 'START CHOPPIN'#39;
    Button1.TabOrder := 14;
    end;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('Form', 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.

    I need it to be able (when you fill your information in) to start up and log in. I'm using the declare players for this:

    SCAR Code:
    Players[0].Name := ;// need it to store the name entered in the form
      Players[0].Pass := Password;// vise versa
      Players[0].Active := True;
      Players[0].pin := 0000;

      Players[1].Name := ;
      Players[1].Pass := Password2;
      Players[1].Active := True;
      Players[1].pin := 0000;

    I want it to login using this

    SCAR Code:
    Procedure ScriptSetup;
    Begin
      [B]If Not (loggedin) then
        Begin[/B]
       /

    If you can help it would be apprieciated alot....

    ->{Nauman}<-

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    use srl player form search for a tut from summilion

    SCAR Code:
    SrlPlayerForm or SRLPlayer(s)form
    ~Hermen

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    No i want my form to be different hermpie . I need it to get the information that the user types into the form so i goes into the declareplayers procedure.

  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    that not to hard your using teh form editor if not then go there check soem stuff and you will find it

    Wootness: 2k posts!!!
    ~Hermen

  5. #5
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    I don't think you understand...

    ->{Nauman}<-

  6. #6
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    procedure StartClick(sender: TObject);
    begin
      Username := UserNameOne.Text;
      Password := PassWordTwo.Text;
      WriteLn('Username1 = ' + Username);
      Writeln('Password1= ' + Password);
      Username := UserNameTwo.Text;
      Password := PassWordTwo.Text;
      WriteLn('Username2 = ' + Username);
      Writeln('Password2 = ' + Password);
      frmDesign.ModalResult:= mrOk;
    end;

    SCAR Code:
    Players[0].Name := UserNameOne.Text;
    Players[0].Pass := PassWordOne.Text;

    Try that?

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  7. #7
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Omg rogeruk thats good man thx!! It works ure on me credit list now!!!

  8. #8
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You'd be better of doing it with a loop ofcourse, to reduce the size of the file (less lines) :P. Either way tho

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  9. #9
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I would still advise you to check out :

    http://www.villavu.com/forum/showthread.php?t=17966
    Administrator's Warning:


  10. #10
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Ok thanks Sum

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with putting forms into my script.
    By Dangerous Garden Tools in forum OSR Help
    Replies: 5
    Last Post: 09-24-2007, 10:22 AM
  2. Some forms help.
    By penguins in forum OSR Help
    Replies: 2
    Last Post: 07-10-2007, 02:45 AM
  3. Forms-adding variables from to script?Help
    By wtf i sp4nk in forum OSR Help
    Replies: 2
    Last Post: 01-27-2007, 03:20 PM
  4. Applying Forms To my script?HElp!
    By wtf i sp4nk in forum OSR Help
    Replies: 5
    Last Post: 01-06-2007, 11:17 PM
  5. Script Freezes while using forms
    By Yakman in forum OSR Help
    Replies: 1
    Last Post: 10-07-2006, 08:40 PM

Posting Permissions

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