Results 1 to 5 of 5

Thread: General Script Help

  1. #1
    Join Date
    Apr 2007
    Location
    The Buckeye State
    Posts
    482
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default General Script Help

    SCAR Code:
    |=======================================================================|
    //|Welcome to EZTyper, brough to by Esteban! Please Enjoy.                |
    //|Remember set the constants with comments after them.                   |
    //|Text Colors: Red: - Green: - White: - Cyan: - Purple:                  |
    //|Text Color Effects: Flash1: - Flash2: - Flash3: - Scroll: - Shake:     |
    //|Wave: - Wave2: - Slide: - Glow1: - Glow2: - Glow3                      |
    //|Text Color and Effect Format: Color:Effect: Text                       |
    //|Example: Red:wave: Hello! You would type this in the message1,2, or 3  |
    //|=======================================================================|

    program EZTyper;
    {.include SRL\SRL.SCAR}
    {.include SRL/SRL/Misc/Trade.scar}

    var
      frmDesign : TForm;
      Label1 : TLabel;
      Message1 : TLabel;
      Message2 : TLabel;
      Message3 : TLabel;
      MessageSpamCheckBox : TLabel;
      Edit1 : TEdit;
      Edit2 : TEdit;
      MessageBox3 : TEdit;
      MessageBox2 : TEdit;
      SpamMessages : TCheckBox;
      StartTyping : TButton;
     
      SendMessage1 : String;
      SendMessage2 : String;
      SendMessage3 : String;
      MessageSpam : Boolean;

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

    procedure ShowFormModal; // Default Code
    begin
      frmDesign.ShowModal;
    end;

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

    const

    Credits1=' ____  ___    _____       __   ____  ___    ';
    Credits2='|        /      |   \  / |__| |     |___|   ';
    Credits3='|---    /  ---  |    \/  |    |---  | \      BY';
    Credits4='|____  /__      |    /   |    |____ |  \    ';
    Credits5=' ';
    Credits6='8888888         888            888';
    Credits7='88              888            888';
    Credits8='88              888            888';
    Credits9='8888   .d8888b  888888 .d88b.  88888b.   8888b.  8888b.';
    CreditsA='88     88K      888   d8P  Y8b 888 "88b     "88b 888 88b';
    CreditsB='88     "Y8888b. 888   88888888 888  888 .d888888 888 888';
    CreditsC='88          X88 Y88b. Y8b.     888 d88P 888  888 888 888';
    CreditsD='8888888 88888P/  "Y888 "Y8888  88888P"  "Y888888 888 888';
    CreditsD1=' ';
    CreditsE='With thanks to jarlaxe for guidance from his script';
    CreditsF='Script Beginning in...';
    CreditsG='5...';
    CreditsH='4...';
    CreditsI='3...';
    CreditsJ='2...';
    CreditsK='1...';
    CreditsL='Script Starting!';

    procedure ClickButton(sender: TObject);   // Adding Buttons and Interactivity
    begin

      SendMessage1 := Edit1.text;
      SendMessage2 := MessageBox2.text;
      SendMessage3 := MessageBox3.text;
      If(SpamMessages.checked)then MessageSpam := True;
     
      SendKeys(SendMessage1+chr(13));
      wait(4000+Random(500));
      SendKeys(SendMessage2+chr(13));
      wait(4000+Random(500))
      SendKeys(SendMessage3+chr(13));
      wait(4000+Random(500));
     

      If(MessageSpam)then
      Writeln('Spamming Messages');
      frmDesign.Caption:= frmDesign.Caption + '.';
      frmDesign.ModalResult:= mrOk;
    end;

    Procedure AddPic;    // Loading a Picture
    var
      Picture : integer;
      Canvas : TCanvas;
    begin
      Canvas:= GetBitmapCanvas(Picture);
      CopyCanvas(Canvas, frmDesign.Canvas, 1, -1, 300, 520, 0, 0, 315, 520);
    end;

    Procedure FormPaintStar(Sender : TObject);    // Adding a picture
    begin
      AddPic;
    end;

    Procedure InitForm;
    begin
    frmDesign := CreateForm;
    frmDesign.Left := 250;
    frmDesign.Top := 114;
    frmDesign.Width := 309;
    frmDesign.Height := 282;
    frmDesign.Caption := 'EZTyper AutoTyper';
    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 := 69;
    Label1.Top := 7;
    Label1.Width := 137;
    Label1.Height := 20;
    Label1.Caption := 'EZTyper AutoTyper';
    Label1.Font.Color := clWindowText;
    Label1.Font.Height := -16;
    Label1.Font.Name := 'MS Sans Serif';
    Label1.Font.Style := [];
    Label1.ParentFont := False;
    Message1 := TLabel.Create(frmDesign);
    Message1.Parent := frmDesign;
    Message1.Left := 20;
    Message1.Top := 40;
    Message1.Width := 52;
    Message1.Height := 13;
    Message1.Caption := 'Message 1';
    Message2 := TLabel.Create(frmDesign);
    Message2.Parent := frmDesign;
    Message2.Left := 20;
    Message2.Top := 80;
    Message2.Width := 52;
    Message2.Height := 13;
    Message2.Caption := 'Message 2';
    Message3 := TLabel.Create(frmDesign);
    Message3.Parent := frmDesign;
    Message3.Left := 20;
    Message3.Top := 120;
    Message3.Width := 52;
    Message3.Height := 13;
    Message3.Caption := 'Message 3';
    MessageSpamCheckBox := TLabel.Create(frmDesign);
    MessageSpamCheckBox.Parent := frmDesign;
    MessageSpamCheckBox.Left := 86;
    MessageSpamCheckBox.Top := 160;
    MessageSpamCheckBox.Width := 190;
    MessageSpamCheckBox.Height := 13;
    MessageSpamCheckBox.Caption := 'Click the Box to Type Messages Quickly';
    Edit1 := TEdit.Create(frmDesign);
    Edit1.Parent := frmDesign;
    Edit1.Left := 90;
    Edit1.Top := 40;
    Edit1.Width := 180;
    Edit1.Height := 21;
    Edit1.Hint := 'Type First Message to AutoType Here';
    Edit1.ParentShowHint := False;
    Edit1.ShowHint := True;
    Edit1.TabOrder := 8;
    Edit2 := TEdit.Create(frmDesign);
    Edit2.Parent := frmDesign;
    Edit2.Left := 470;
    Edit2.Top := -285;
    Edit2.Width := 180;
    Edit2.Height := 21;
    Edit2.Hint := 'Type Your Second Message to AutoType Here';
    Edit2.TabOrder := 9;
    MessageBox3 := TEdit.Create(frmDesign);
    MessageBox3.Parent := frmDesign;
    MessageBox3.Left := 90;
    MessageBox3.Top := 117;
    MessageBox3.Width := 180;
    MessageBox3.Height := 21;
    MessageBox3.Hint := 'Type Your Final Message to AutoType Here';
    MessageBox3.ParentShowHint := False;
    MessageBox3.ShowHint := True;
    MessageBox3.TabOrder := 10;
    MessageBox2 := TEdit.Create(frmDesign);
    MessageBox2.Parent := frmDesign;
    MessageBox2.Left := 90;
    MessageBox2.Top := 80;
    MessageBox2.Width := 180;
    MessageBox2.Height := 21;
    MessageBox2.Hint := 'Type Your Second Message to AutoType Here';
    MessageBox2.TabOrder := 11;
    SpamMessages := TCheckBox.Create(frmDesign);
    SpamMessages.Parent := frmDesign;
    SpamMessages.Left := 55;
    SpamMessages.Top := 160;
    SpamMessages.Width := 19;
    SpamMessages.Height := 17;
    SpamMessages.Hint := 'Click Here to Send Messages Quickly, Like for Selling an Item';
    SpamMessages.ParentShowHint := False;
    SpamMessages.ShowHint := True;
    SpamMessages.TabOrder := 12;
    StartTyping := TButton.Create(frmDesign);
    StartTyping.Parent := frmDesign;
    StartTyping.Left := 110;
    StartTyping.Top := 190;
    StartTyping.Width := 75;
    StartTyping.Height := 25;
    StartTyping.Hint := 'Click to Start EZTyper';
    StartTyping.Caption := 'Start';
    StartTyping.ParentShowHint := False;
    StartTyping.ShowHint := True;
    StartTyping.TabOrder := 13;
    StartTyping.OnClick :=@ClickButton;
    end;

    procedure Credits;
    begin
    wait(1000+Random(100));
    writeln(Credits1);
    wait(500);
    writeln(Credits2);
    wait(500);
    writeln(Credits3);
    wait(500);
    writeln(Credits4);
    wait(500);
    writeln(Credits5);
    wait(500);
    writeln(Credits6);
    wait(500);
    writeln(Credits7);
    wait(500);
    writeln(credits8);
    wait(500);
    writeln(credits9);
    wait(500);
    writeln(creditsA);
    wait(500);
    writeln(creditsB);
    wait(500);
    writeln(creditsC);
    wait(500);
    writeln(creditsD);
    wait(500);
    writeln(CreditsD1);
    writeln(creditsE);
    wait(5000);
    ClearDebug;
    writeln(creditsF);
    wait(1000);
    writeln(creditsG);
    wait(1000);
    writeln(creditsH);
    wait(1000);
    writeln(creditsI);
    wait(1000);
    writeln(creditsJ);
    wait(1000);
    writeln(creditsK);
    wait(1000);
    writeln(creditsL);
    wait(1000);
    end;

    begin
      SetupSRL;
      ClearDebug;
      Credits;
      ClearDebug;
      FindNormalRandoms;
      SafeInitForm;
      wait(2000);      // Load and Show Forms
      SafeShowFormModal;
      wait(7000);

    end.

    Alright, my script works, but not exactly as i want it to. For some reason, in the procedure ClickButton, SendMessage1 ,2, and 3 use the SendKeys procedure to type the message to the RS Client. For some reason, it only sends SendMessage2 and 3, not SendMessage1. Also, in-

    SCAR Code:
    begin
      SetupSRL;
      ClearDebug;
      Credits;
      ClearDebug;
      SafeInitForm;
      wait(2000);      // Load and Show Forms
      SafeShowFormModal;
      wait(7000);
      FindNormalRandoms;

    after that would go repeat, the the procedures i want to repeat. What do i put after repeat so that it keeps on sending the messages i declared it to send?
    I like my coffee black just like my metal.

  2. #2
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    you use until with looping as far as i can gather reading through your script that message1 doesnt have a message box? I honestly dont understand how it works

    MessageBox2 := TEdit.Create(frmDesign);
    MessageBox3 := TEdit.Create(frmDesign);

  3. #3
    Join Date
    Apr 2007
    Location
    The Buckeye State
    Posts
    482
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Didn't really understand that, if someone could explain it more in depth or provide an example of how it should look, it would be appreciated.
    I like my coffee black just like my metal.

  4. #4
    Join Date
    Jan 2007
    Location
    Nomming bits in your RAM
    Posts
    385
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    begin
      SetupSRL;
      ClearDebug;
      Credits;
      ClearDebug;
      SafeInitForm;
      wait(2000);      // Load and Show Forms
      SafeShowFormModal;
      wait(7000);
      FindNormalRandoms;
    Repeat
      Thingstorepeathere;
    Until(I >= 9999); //Can say false for non-stop. Or, a variable. Your choice
    end.
    GoOd LuCk
    Current Project: Catching up. XD. Potentially back for the summer, depending on how things go.

  5. #5
    Join Date
    Apr 2007
    Location
    The Buckeye State
    Posts
    482
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Macro_FTW, If you read my question correctly, i already know to put repeat then whatever i want it to repeat, but I was asking what specific procedure do i put after repeat it have it constantly send the messages.
    I like my coffee black just like my metal.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. general scripting help
    By ben600006 in forum OSR Help
    Replies: 3
    Last Post: 02-02-2009, 12:02 PM
  2. General SCAR help!
    By jompa in forum News and General
    Replies: 4
    Last Post: 09-11-2008, 02:18 AM
  3. my 1st firemaking script very general check it out
    By shaheerpak in forum First Scripts
    Replies: 14
    Last Post: 08-09-2008, 05:24 PM
  4. General treefinder...
    By Negaal in forum Research & Development Lounge
    Replies: 22
    Last Post: 02-14-2008, 02:23 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
  •