Results 1 to 4 of 4

Thread: Need some help

  1. #1
    Join Date
    Mar 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need some help

    I nneed help, I need it when click start in my form it starts the script and says it did in the debug box, when in my form and hits cancel it doesn't start the script but says canceled form in the debug box, and the username and password and active stuff actually work so that can be used for ppls login stuff, no tuts show how to do that :S

    SCAR Code:
    program New;

    var
      WoodCutter_Banker : TForm;
      UserName : TLabel;
      Password : TLabel;
      Active : TLabel;
      Username2 : TLabel;
      Password2 : TLabel;
      Active2 : TLabel;
      Start : TButton;
      Username1 : TMemo;
      Password1 : TMemo;
      True_False : TCheckBox;
      RichEdit1 : TRichEdit;
      Username12 : TMemo;
      Password12 : TMemo;
      True_False2 : TCheckBox;
      Cancel : TButton;

    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;

    procedure ShowFormModal;
    begin
      WoodCutter_Banker.ShowModal;
    end;

    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;

    Procedure ButtonClick(sender : tobject);
    begin
        Writeln('Script Started');
        WoodCutter_Banker.ModalResult := Mrok;
        end;

    Procedure InitForm;
    begin
    WoodCutter_Banker := CreateForm;
    WoodCutter_Banker.Left := 250;
    WoodCutter_Banker.Top := 114;
    WoodCutter_Banker.Width := 458;
    WoodCutter_Banker.Height := 434;
    WoodCutter_Banker.Caption := 'WoodCutter_Banker';
    WoodCutter_Banker.Color := clBtnFace;
    WoodCutter_Banker.Font.Color := clWindowText;
    WoodCutter_Banker.Font.Height := -11;
    WoodCutter_Banker.Font.Name := 'MS Sans Serif';
    WoodCutter_Banker.Font.Style := [];
    WoodCutter_Banker.Visible := False;
    WoodCutter_Banker.PixelsPerInch := 96;
    UserName := TLabel.Create(WoodCutter_Banker);
    UserName.Parent := WoodCutter_Banker;
    UserName.Left := 51;
    UserName.Top := 59;
    UserName.Width := 50;
    UserName.Height := 13;
    UserName.Caption := 'UserName';
    Password := TLabel.Create(WoodCutter_Banker);
    Password.Parent := WoodCutter_Banker;
    Password.Left := 53;
    Password.Top := 102;
    Password.Width := 46;
    Password.Height := 13;
    Password.Caption := 'Password';
    Active := TLabel.Create(WoodCutter_Banker);
    Active.Parent := WoodCutter_Banker;
    Active.Left := 54;
    Active.Top := 142;
    Active.Width := 30;
    Active.Height := 13;
    Active.Caption := 'Active';
    Username2 := TLabel.Create(WoodCutter_Banker);
    Username2.Parent := WoodCutter_Banker;
    Username2.Left := 54;
    Username2.Top := 203;
    Username2.Width := 54;
    Username2.Height := 13;
    Username2.Caption := 'Username2';
    Password2 := TLabel.Create(WoodCutter_Banker);
    Password2.Parent := WoodCutter_Banker;
    Password2.Left := 54;
    Password2.Top := 245;
    Password2.Width := 52;
    Password2.Height := 13;
    Password2.Caption := 'Password2';
    Active2 := TLabel.Create(WoodCutter_Banker);
    Active2.Parent := WoodCutter_Banker;
    Active2.Left := 56;
    Active2.Top := 281;
    Active2.Width := 36;
    Active2.Height := 13;
    Active2.Caption := 'Active2';
    Start := TButton.Create(WoodCutter_Banker);
    Start.Parent := WoodCutter_Banker;
    Start.OnClick := @Buttonclick;
    Start.Left := 22;
    Start.Top := 324;
    Start.Width := 75;
    Start.Height := 25;
    Start.Caption := 'Start';
    Start.TabOrder := 8;
    Username1 := TMemo.Create(WoodCutter_Banker);
    Username1.Parent := WoodCutter_Banker;
    Username1.Left := 109;
    Username1.Top := 54;
    Username1.Width := 106;
    Username1.Height := 26;
    Username1.Lines.Add('Username1');
    Username1.TabOrder := 9;
    Password1 := TMemo.Create(WoodCutter_Banker);
    Password1.Parent := WoodCutter_Banker;
    Password1.Left := 108;
    Password1.Top := 93;
    Password1.Width := 106;
    Password1.Height := 26;
    Password1.Lines.Add('Password1');
    Password1.TabOrder := 10;
    True_False := TCheckBox.Create(WoodCutter_Banker);
    True_False.Parent := WoodCutter_Banker;
    True_False.Left := 111;
    True_False.Top := 141;
    True_False.Width := 97;
    True_False.Height := 17;
    True_False.Caption := 'True_False';
    True_False.TabOrder := 11;
    RichEdit1 := TRichEdit.Create(WoodCutter_Banker);
    RichEdit1.Parent := WoodCutter_Banker;
    RichEdit1.Left := 237;
    RichEdit1.Top := 74;
    RichEdit1.Width := 185;
    RichEdit1.Height := 89;
    RichEdit1.Lines.Add('This is my first form. This is just to set ');
    RichEdit1.Lines.Add('up your players(Making better soon)');
    RichEdit1.Lines.Add('Just setup the information then hit ');
    RichEdit1.Lines.Add('start for the script to start.');
    RichEdit1.Lines.Add('');
    RichEdit1.Lines.Add('Please post proggies ');
    RichEdit1.TabOrder := 12;
    Username12 := TMemo.Create(WoodCutter_Banker);
    Username12.Parent := WoodCutter_Banker;
    Username12.Left := 112;
    Username12.Top := 200;
    Username12.Width := 106;
    Username12.Height := 26;
    Username12.Lines.Add('Username12');
    Username12.TabOrder := 13;
    Password12 := TMemo.Create(WoodCutter_Banker);
    Password12.Parent := WoodCutter_Banker;
    Password12.Left := 112;
    Password12.Top := 238;
    Password12.Width := 106;
    Password12.Height := 26;
    Password12.Lines.Add('Password12');
    Password12.TabOrder := 14;
    True_False2 := TCheckBox.Create(WoodCutter_Banker);
    True_False2.Parent := WoodCutter_Banker;
    True_False2.Left := 112;
    True_False2.Top := 280;
    True_False2.Width := 97;
    True_False2.Height := 17;
    True_False2.Caption := 'True_False2';
    True_False2.TabOrder := 15;
    Cancel := TButton.Create(WoodCutter_Banker);
    Cancel.Parent := WoodCutter_Banker;
    Cancel.OnClick := @Buttonclick;
    Cancel.Left := 118;
    Cancel.Top := 324;
    Cancel.Width := 75;
    Cancel.Height := 25;
    Cancel.Caption := 'Cancel';
    Cancel.TabOrder := 16;
    end;

    begin
      SafeInitForm;
      SafeShowFormModal;
    end.

    Please help and explain if u can so i can learn soim not just taking and not learning anything thanks alot, if u need help with anything else but forms atm, then ask me

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Well id just get rid of the forum, or learn how to tweak the player array like in starblasters scripts.

    With a form like this, you can only support 1 player for the script, and people people want multi player capabilities when using a script.

  3. #3
    Join Date
    Mar 2007
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    kk, but i was gonna make more ppl

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

    Default

    if ur gonna make more people...then user starblaster's script as an example...otheriwse dont use a form
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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
  •