Results 1 to 4 of 4

Thread: help with AutoTalker with Form

  1. #1
    Join Date
    Jun 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default help with AutoTalker with Form

    I made an AutoTalker with a Form and i used Tv-XxX's tut but when i turn frmDesign.Visible := True; to false and I run it, it doesn't show me the form.

    and in the Debug box it just says this:
    Successfully compiled
    [Runtime Error] : Exception: Unknown procedure in line 246 in script C:\Program Files\SCAR 3.11\Scripts\SuperAutoTalker.scar

    Here's the script, please help me out if you can.

    SCAR Code:
    {-----------------------------------------------------------------)
    (  AutoTalker by                                                  )
    (                                                                 )
    (   _/_/_/_/_/  _/                                  _/            )
    (      _/      _/_/_/      _/_/    _/_/_/  _/_/          _/_/_/   )
    (     _/      _/    _/  _/    _/  _/    _/    _/  _/  _/_/        )
    (    _/      _/    _/  _/    _/  _/    _/    _/  _/      _/_/     )
    (   _/      _/    _/    _/_/    _/    _/    _/  _/  _/_/_/        )
    (                                                                 )
    (                                                                 )
    (-----------------------------------------------------------------}

     
    program Thomis_Cool_AutoTalker;
    {.include SRL/SRL.scar}
     
     
    var
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      Label3 : TLabel;
      Label4 : TLabel;
      Label5 : TLabel;
      Edit1 : TEdit;
      Edit2 : TEdit;
      Edit3 : TEdit;
      Edit4 : TEdit;
      Edit5 : TEdit;
      Button1 : TButton;
     
     
    procedure SayTheStuff;
    begin
       if IsFKeyDown(1) then
          TypeSend(Edit1.Text)
       if IsFKeyDown(2) then
          TypeSend(Edit2.Text)
       if IsFKeyDown(3) then
          TypeSend(Edit3.Text)
       if IsFKeyDown(4) then
          TypeSend(Edit4.Text)
       if IsFKeyDown(5) then
          TypeSend(Edit5.Text)
    end;
     
    procedure InitForm;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.BorderStyle := bsSingle;
    frmDesign.Caption := 'Thomis'#39' AutoTalker Form';
    frmDesign.ClientHeight := 309;
    frmDesign.ClientWidth := 642;
    frmDesign.Color := clBlack;
    frmDesign.Font.Color := clBlack;
    frmDesign.Font.Height := -11;
    frmDesign.Font.Name := 'MS Sans Serif';
    frmDesign.Font.Style := [];
    frmDesign.Visible := True;
    frmDesign.PixelsPerInch := 96;
    Label1 := TLabel.Create(frmDesign);
    Label1.Parent := frmDesign;
    Label1.Left := 62;
    Label1.Top := 46;
    Label1.Width := 52;
    Label1.Height := 16;
    Label1.Caption := 'F1 Key:';
    Label1.Color := clBlack;
    Label1.Font.Color := clWhite;
    Label1.Font.Height := -13;
    Label1.Font.Name := 'MS Sans Serif';
    Label1.Font.Style := [fsBold];
    Label1.ParentColor := False;
    Label1.ParentFont := False;
    Label2 := TLabel.Create(frmDesign);
    Label2.Parent := frmDesign;
    Label2.Left := 336;
    Label2.Top := 45;
    Label2.Width := 52;
    Label2.Height := 16;
    Label2.Caption := 'F2 Key:';
    Label2.Font.Color := clWhite;
    Label2.Font.Height := -13;
    Label2.Font.Name := 'MS Sans Serif';
    Label2.Font.Style := [fsBold];
    Label2.ParentFont := False;
    Label3 := TLabel.Create(frmDesign);
    Label3.Parent := frmDesign;
    Label3.Left := 62;
    Label3.Top := 105;
    Label3.Width := 52;
    Label3.Height := 16;
    Label3.Caption := 'F3 Key:';
    Label3.Font.Color := clWhite;
    Label3.Font.Height := -13;
    Label3.Font.Name := 'MS Sans Serif';
    Label3.Font.Style := [fsBold];
    Label3.ParentFont := False;
    Label4 := TLabel.Create(frmDesign);
    Label4.Parent := frmDesign;
    Label4.Left := 336;
    Label4.Top := 105;
    Label4.Width := 52;
    Label4.Height := 16;
    Label4.Caption := 'F4 Key:';
    Label4.Font.Color := clWhite;
    Label4.Font.Height := -13;
    Label4.Font.Name := 'MS Sans Serif';
    Label4.Font.Style := [fsBold];
    Label4.ParentFont := False;
    Label5 := TLabel.Create(frmDesign);
    Label5.Parent := frmDesign;
    Label5.Left := 295;
    Label5.Top := 165;
    Label5.Width := 52;
    Label5.Height := 16;
    Label5.Caption := 'F5 Key:';
    Label5.Font.Color := clWhite;
    Label5.Font.Height := -13;
    Label5.Font.Name := 'MS Sans Serif';
    Label5.Font.Style := [fsBold];
    Label5.ParentFont := False;
    Edit1 := TEdit.Create(frmDesign);
    Edit1.Parent := frmDesign;
    Edit1.Left := 63;
    Edit1.Top := 67;
    Edit1.Width := 246;
    Edit1.Height := 21;
    Edit1.Color := clGray;
    Edit1.Font.Color := clWhite;
    Edit1.Font.Height := -11;
    Edit1.Font.Name := 'MS Sans Serif';
    Edit1.Font.Style := [];
    Edit1.ParentFont := False;
    Edit1.TabOrder := 8;
    Edit1.Text := 'Edit1';
    Edit2 := TEdit.Create(frmDesign);
    Edit2.Parent := frmDesign;
    Edit2.Left := 336;
    Edit2.Top := 67;
    Edit2.Width := 246;
    Edit2.Height := 21;
    Edit2.Color := clGray;
    Edit2.Font.Color := clWhite;
    Edit2.Font.Height := -11;
    Edit2.Font.Name := 'MS Sans Serif';
    Edit2.Font.Style := [];
    Edit2.ParentFont := False;
    Edit2.TabOrder := 9;
    Edit2.Text := 'Edit2';
    Edit3 := TEdit.Create(frmDesign);
    Edit3.Parent := frmDesign;
    Edit3.Left := 62;
    Edit3.Top := 130;
    Edit3.Width := 246;
    Edit3.Height := 21;
    Edit3.Color := clGray;
    Edit3.Font.Color := clWhite;
    Edit3.Font.Height := -11;
    Edit3.Font.Name := 'MS Sans Serif';
    Edit3.Font.Style := [];
    Edit3.ParentFont := False;
    Edit3.TabOrder := 10;
    Edit3.Text := 'Edit3';
    Edit4 := TEdit.Create(frmDesign);
    Edit4.Parent := frmDesign;
    Edit4.Left := 336;
    Edit4.Top := 130;
    Edit4.Width := 246;
    Edit4.Height := 21;
    Edit4.Color := clGray;
    Edit4.Font.Color := clWhite;
    Edit4.Font.Height := -11;
    Edit4.Font.Name := 'MS Sans Serif';
    Edit4.Font.Style := [];
    Edit4.ParentFont := False;
    Edit4.TabOrder := 11;
    Edit4.Text := 'Edit4';
    Edit5 := TEdit.Create(frmDesign);
    Edit5.Parent := frmDesign;
    Edit5.Left := 199;
    Edit5.Top := 190;
    Edit5.Width := 246;
    Edit5.Height := 21;
    Edit5.Color := clGray;
    Edit5.Font.Color := clWhite;
    Edit5.Font.Height := -11;
    Edit5.Font.Name := 'MS Sans Serif';
    Edit5.Font.Style := [];
    Edit5.ParentFont := False;
    Edit5.TabOrder := 12;
    Edit5.Text := 'Edit5';
    Button1 := TButton.Create(frmDesign);
    Button1.Parent := frmDesign;
    Button1.Left := 274;
    Button1.Top := 253;
    Button1.Width := 75;
    Button1.Height := 25;
    Button1.Caption := 'Start';
    Button1.TabOrder := 13;
    Button1.ModalResult := 1;
    end;
     
    procedure SafeInitForm;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('InitForm', v);
    end;
     
    procedure SafeShowFormModal;
    var
      v: TVariantArray;
    begin
      setarraylength(V, 0);
      ThreadSafeCall('ShowFormModal', v);
    end;
     
    begin
      SafeInitForm;
      SafeShowFormModal;
    end.

  2. #2
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    You dont have the procedure ShowFormModal in your script. Look in other peoples forms and you will see.

  3. #3
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {-----------------------------------------------------------------)
    (  AutoTalker by                                                  )
    (                                                                 )
    (   _/_/_/_/_/  _/                                  _/            )
    (      _/      _/_/_/      _/_/    _/_/_/  _/_/          _/_/_/   )
    (     _/      _/    _/  _/    _/  _/    _/    _/  _/  _/_/        )
    (    _/      _/    _/  _/    _/  _/    _/    _/  _/      _/_/     )
    (   _/      _/    _/    _/_/    _/    _/    _/  _/  _/_/_/        )
    (                                                                 )
    (                                                                 )
    (-----------------------------------------------------------------}


    program Thomis_Cool_AutoTalker;
    {.include SRL/SRL.scar}


    var
      frmDesign : TForm;
      Label1 : TLabel;
      Label2 : TLabel;
      Label3 : TLabel;
      Label4 : TLabel;
      Label5 : TLabel;
      Edit1 : TEdit;
      Edit2 : TEdit;
      Edit3 : TEdit;
      Edit4 : TEdit;
      Edit5 : TEdit;
      Button1 : TButton;


    procedure SayTheStuff;
    begin
       if IsFKeyDown(1) then
          TypeSend(Edit1.Text)
       if IsFKeyDown(2) then
          TypeSend(Edit2.Text)
       if IsFKeyDown(3) then
          TypeSend(Edit3.Text)
       if IsFKeyDown(4) then
          TypeSend(Edit4.Text)
       if IsFKeyDown(5) then
          TypeSend(Edit5.Text)
    end;

    procedure InitForm;
    begin
      frmDesign := CreateForm;
      with frmDesign do
      begin
        Position := poScreenCenter;
        BorderStyle := bsSingle;
        Caption := 'Thomis'#39' AutoTalker Form';
        SetBounds(0, 0, 642, 309);
        Color := clBlack;
      end;

      Label1 := TLabel.Create(frmDesign);
      with Label1 do
      begin
        Parent := frmDesign;
        SetBounds(62, 46, 52, 16);
        Caption := 'F1 Key:';
        Font.Color := clWhite;
        Font.Height := -13;
        Font.Name := 'MS Sans Serif';
        Font.Style := [fsBold];
      end;


      Label2 := TLabel.Create(frmDesign);
      with Label2 do
      begin
        Parent := frmDesign;
        SetBounds(336, 45, 52, 16);
        Caption := 'F2 Key:';
        Font.Color := clWhite;
        Font.Height := -13;
        Font.Name := 'MS Sans Serif';
        Font.Style := [fsBold];
      end;

      Label3 := TLabel.Create(frmDesign);
      with Label3 do
      begin
        Parent := frmDesign;
        SetBounds(62, 105, 52, 16);
        Caption := 'F3 Key:';
        Font.Color := clWhite;
        Font.Height := -13;
        Font.Name := 'MS Sans Serif';
        Font.Style := [fsBold];
      end;

      Label4 := TLabel.Create(frmDesign);
      with Label4 do
      begin
        Parent := frmDesign;
        SetBounds(336, 105, 52, 16);
        Caption := 'F4 Key:';
        Font.Color := clWhite;
        Font.Height := -13;
        Font.Name := 'MS Sans Serif';
        Font.Style := [fsBold];
      end;

      Label5 := TLabel.Create(frmDesign);
      with Label5 do
      begin
        Parent := frmDesign;
        SetBounds(295, 165, 52, 16);
        Caption := 'F5 Key:';
        Font.Color := clWhite;
        Font.Height := -13;
        Font.Name := 'MS Sans Serif';
        Font.Style := [fsBold];
      end;

      Edit1 := TEdit.Create(frmDesign);
      with Edit1 do
      begin
        Parent := frmDesign;
        SetBounds(63, 67, 246, 21);
        Color := clGray;
        Font.Color := clWhite;
        Font.Name := 'MS Sans Serif';
        Text := 'Edit1';
      end;

      Edit2 := TEdit.Create(frmDesign);
      with Edit2 do
      begin
        Parent := frmDesign;
        SetBounds(336, 67, 246,21);
        Color := clGray;
        Font.Color := clWhite;
        Font.Name := 'MS Sans Serif';
        Text := 'Edit2';
      end;

      Edit3 := TEdit.Create(frmDesign);
      with Edit3 do
      begin
        Parent := frmDesign;
        SetBounds(62, 130, 246, 21);
        Color := clGray;
        Font.Color := clWhite;
        Font.Height := -11;
        Font.Name := 'MS Sans Serif';
        Text := 'Edit3';
      end;

      Edit4 := TEdit.Create(frmDesign);
      with Edit4 do
      begin
        Parent := frmDesign;
        SetBounds(336, 130, 246, 21);
        Color := clGray;
        Font.Color := clWhite;
        Font.Name := 'MS Sans Serif';
        Text := 'Edit4';
      end;

      Edit5 := TEdit.Create(frmDesign);
      with Edit5 do
      begin
        Parent := frmDesign;
        SetBounds(199, 190, 246, 21);
        Color := clGray;
        Font.Color := clWhite;
        Font.Name := 'MS Sans Serif';
        Edit5.Text := 'Edit5';
      end;

      Button1 := TButton.Create(frmDesign);
      with Button1 do
      begin
        Parent := frmDesign;
        SetBounds(274, 253, 75, 25);
        Caption := 'Start';
        ModalResult := 1;
      end;
    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.

    This is shorter and looks a lot better.

    Edit: Damn, sorry for the bump.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  4. #4
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Only 19 days since last post :P

    If what you wrote was too difficult, just set in this before SafeShowFormModal.
    SCAR Code:
    procedure ShowFormModal;
    begin
      frmDesign.ShowModal;
    end;
    and then delete the frmDesign.Visible line.

    -Knives

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AutoTalker Form Problems.
    By Daniel in forum OSR Help
    Replies: 4
    Last Post: 11-07-2007, 05:13 AM
  2. Negaal Autotalker(form)
    By Negaal in forum RS3 Outdated / Broken Scripts
    Replies: 0
    Last Post: 09-02-2007, 03:25 AM
  3. VitaminC Autotalker (With form!!)
    By vitaminc in forum First Scripts
    Replies: 5
    Last Post: 06-23-2007, 04:58 AM
  4. [ Endr1x] - AutoTalker with Form v0.1
    By endr1x in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 02-06-2007, 05:32 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
  •