phantom1
2009-03-08 21:49:01
this is my first script and its a auto typer
2009-03-08 21:49:01
2009-03-08 23:03:58
program AutoTyper;
{.include SRL/SRL.scar}
var
Msgs : TStringArray;
TimesToType, TimesTyped, WaitTime : integer;
FKey : integer;
procedure Setup;
begin
Msgs := ['msg1', 'msg2', 'msg3', 'etc']; //The messages you want to type.
TimesToType := 5; {How many times you want to say the text. This will
increment when ALL the messages are said not just one.}
FKey := 12; //The FKey you want to use to stop the script when pressed.
WaitTime := 100; //Time to wait in between text.
if ((GetArrayLength(Msgs) = 0) or (TimesToType = 0)) then
exit;
end;
procedure TypeText(index : integer);
begin
if Msgs[index] = '' then exit;
if IsFKeyDown(FKey) then TerminateScript;
TypeSend(Msgs[Index]);
Wait(WaitTime + random(80));
end;
procedure TypeArray;
var
i : integer;
begin
for i := 0 to GetArrayLength(Msgs) - 1 do
TypeText(i);
TimesTyped := TimesTyped + 1; // Not inc because it's slower ;)
end;
begin
Setup;
repeat
TypeArray;
until((IsFKeyDown(FKey)) or (TimesTyped = TimesToType));
end.
2009-03-09 03:26:57
2009-03-09 04:46:26
2009-03-09 04:52:42
program FastTime;
var x,y: integer;
const Count = 1000000;
begin
ClearDebug;
WriteLn('Please wait a few seconds...');
X := GetSystemTime;
for Y:= 0 to Count do
Y := Y + 1;
ClearDebug;
WriteLn('Took '+IntToStr(GetSystemTime - X)+' ms to do '+Inttostr(Count)+' incs using Y := Y + 1;');
X := GetSystemTime;
for Y:= 0 to Count do
Inc(Y);
WriteLn('Took '+IntToStr(GetSystemTime - X)+' ms to do '+Inttostr(Count)+' incs using Inc(Y);');
WriteLn('');
WriteLn('Use Inc();!');
end.
2009-03-09 04:54:24
2009-03-09 05:27:27
2009-03-09 05:28:52
2009-03-09 05:42:13