Results 1 to 16 of 16

Thread: A through Z

  1. #1
    Join Date
    Jan 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default A through Z

    Is it possible to get scar to type random letters???
    ----------^-----------
    -----------------------
    <-RandomPhobia->
    -----------------------
    ----------V----------

  2. #2
    Join Date
    Feb 2009
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm, i dont know. tbh i dont know what scar is ^^

  3. #3
    Join Date
    Jan 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ty u were a lotta help
    ----------^-----------
    -----------------------
    <-RandomPhobia->
    -----------------------
    ----------V----------

  4. #4
    Join Date
    Feb 2009
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No problem, hehe. lol im sorry =P

  5. #5
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Theres probably a better way than this but...

    SCAR Code:
    Program RandomLetter;
    Var
    S : String;

    Procedure GenerateLetter;
    Begin
      Case Random(26) of
        1: S := 'a';
        2: S := 'b';
        3: S := 'c';
        4: S := 'd';
        5: S := 'e';
        6: S := 'f';
        7: S := 'g';
        8: S := 'h';
        9: S := 'i';
        10: S := 'j;'
        11: S := 'k';
        12: S := 'l';
        13: S := 'm;'
        14: S := 'n';
        15: S := 'o';
        16: S := 'p';
        17: S := 'q';
        18: S := 'r';
        19: S := 's';
        20: S := 't';
        21: S := 'u';
        22: S := 'v';
        23: S := 'w';
        24: S := 'x';
        25: S := 'y';
        26: S := 'z';
      end;
    end;

    Begin
      GenerateLetter;
      WriteLN(s);
    end.

    EDIT: Underwear don't be suprised when you get banned for spamming and useless posts...

  6. #6
    Join Date
    Jan 2008
    Location
    Alberta
    Posts
    727
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function RandomLetter: string;
    var
      i: integer;
      RandChars: TStringArray;
    begin
      RandChars := ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p',
                    'q','r','s','t','u','v','w','x','y','z'];
      i := Random(26);
      Result := RandChars[i];
    end;

    Use:
    SCAR Code:
    TypeSend(RandomLetter);

    Rather simple, but it should work.

    By the way, wrong section. It should be in Scripting Help.

  7. #7
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    WriteLN(Chr(65 + random(25)));

    Win.

    ~Sandstorm

  8. #8
    Join Date
    Jan 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hehe srry ........ and thanks for the help
    ----------^-----------
    -----------------------
    <-RandomPhobia->
    -----------------------
    ----------V----------

  9. #9
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Sandstorm View Post
    SCAR Code:
    WriteLN(Chr(65 + random(25)));

    Win.

    ~Sandstorm
    That needs to be Random(26) if you're planning on including Z also.
    :-)

  10. #10
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Method View Post
    That needs to be Random(26) if you're planning on including Z also.
    Woops, forgot it didn't return the last number to.

    ~Sandstorm

  11. #11
    Join Date
    Jan 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks for the ideas guys ........but is there anyway to make the letters type in order like
    A, B, C, D..........also maybe numbers to.......A,B,C,D-1, 2, 3
    ----------^-----------
    -----------------------
    <-RandomPhobia->
    -----------------------
    ----------V----------

  12. #12
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    for i := 65 to 90 do
      WriteLn(Chr(i));

    That will write
    A
    B
    C
    etc.

  13. #13
    Join Date
    Jan 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wat if u need it to type a couple thousand letters and u really really don't want to type that much
    ----------^-----------
    -----------------------
    <-RandomPhobia->
    -----------------------
    ----------V----------

  14. #14
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    All of the consecutive letters? Or just one letter?

  15. #15
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    s := 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
    TypeByte(s[randomrange(1,62));

  16. #16
    Join Date
    Jan 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thx agent
    ----------^-----------
    -----------------------
    <-RandomPhobia->
    -----------------------
    ----------V----------

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
  •