Log in

View Full Version : A through Z



RandomPhobia
02-21-2009, 12:34 AM
Is it possible to get scar to type random letters???

Underwear
02-21-2009, 12:37 AM
Hmm, i dont know. tbh i dont know what scar is ^^

RandomPhobia
02-21-2009, 12:41 AM
Ty u were a lotta help:(

Underwear
02-21-2009, 12:41 AM
No problem, hehe. lol im sorry =P

Richard
02-21-2009, 12:44 AM
Theres probably a better way than this but...

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...

Iron Man
02-21-2009, 01:24 AM
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:

TypeSend(RandomLetter);


Rather simple, but it should work.

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

Sandstorm
02-21-2009, 01:33 AM
WriteLN(Chr(65 + random(25)));

Win.

~Sandstorm

RandomPhobia
02-21-2009, 01:34 AM
hehe srry ........ and thanks for the help

Method
02-21-2009, 02:03 AM
WriteLN(Chr(65 + random(25)));

Win.

~Sandstorm

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

Sandstorm
02-21-2009, 02:08 AM
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

RandomPhobia
02-21-2009, 02:26 AM
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

TViYH
02-21-2009, 03:33 AM
for i := 65 to 90 do
WriteLn(Chr(i));


That will write
A
B
C
etc.

RandomPhobia
02-21-2009, 04:10 AM
wat if u need it to type a couple thousand letters and u really really don't want to type that much:D

TViYH
02-21-2009, 04:45 AM
All of the consecutive letters? Or just one letter?

A G E N T
02-21-2009, 05:08 AM
s := 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ0123456789';
TypeByte(s[randomrange(1,62));

RandomPhobia
02-21-2009, 10:05 PM
thx agent