SRL Archive - SRL Archives

SendTextMis (Eh.. To Much?)


XxKanexX

2006-04-03 02:44:17

I knows theres alot of SendText's. Just made this for fun and to see what everone thinks.

It will randomly make mistakes and randomly correct them based on how high or low the parametre, "MisRate" is. The higher it is, the less mistakes it will make. The lower, the more.

MisRate can be a number between 1 and 5.

The mistake is a key relevently close to the normal key it would have sent. Based on the Qwerty method. :)


function LetterCorrospond(c: string): string;
var Qwert: string;
i, pl: Integer;
begin
Qwert:= 'qwertyuiopasdfghjklzxcvbnm';
if (c = Chr(13)) then
begin
result:= chr(13);
exit;
end;
for i:= 1 to Length(Qwert) do
begin
if (copy(Qwert, i, 1) = c) then
begin
if (Random(2) = 1) then
pl:= i + Random(5)
else
pl:= i - Random(5);
if (pl < 1) or (pl > length(Qwert)-1) then
pl:= i;
result:= StrGet(Qwert, pl);
end;
end;
end;

procedure SendTextMis(s: string; MisRate: integer);
var i, m, mrate: integer;
begin
if (MisRate > 5) or (MisRate < 1) then
MRate:= 2
else
MRate:= MisRate;
for i:= 1 to length(s) do
begin
if (Random(MRate*2) = Random(MRate*2)) and (m < (Length(s)/2)) then
begin
SendKeys(LetterCorrospond(copy(s, i, 1)));
m:= m + 1;
if (Random(MRate*2+(MRate/2)) = Random(MRate*2+(MRate/2)))then
begin
Wait(350 + random(130));
SendKeys(chr(8));
Wait(70 + random(70));
SendKeys(copy(s, i, 1));
end;
end else
SendKeys(copy(s, i, 1));
Wait(70 + random(60));
end;
end;

This dosn't have to go in SRL if there is to many already ;) Depends on opinions.
A test script you can try:

begin
repeat
SendTextMis('hello' + chr(13), 3);
until(isfunctionkeydown(1));
end.

Just press "control" to end it.

Pwnd

2006-04-03 04:39:41


function LetterCorrospond(c: string): string;
var
Qwert: string;
i, pl: Integer;
begin
Qwert:= 'qwertyuiopasdfghjklzxcvbnm';
if (c = Chr(13)) then
begin
result:= chr(13);
exit;
end;
for i:= 1 to Length(Qwert) do
begin
if (copy(Qwert, i, 1) = c) then
begin
if (Random(2) = 1) then
pl:= i + Random(5)
else
pl:= i - Random(5);
if (pl < 1) or (pl > length(Qwert)-1) then
pl:= i;
result:= StrGet(Qwert, pl);
end;
end;
end;

procedure SendTextMis(s: string; MisRate: integer);
var
i, m, mrate: integer;
begin
if (MisRate > 5) or (MisRate < 1) then
MRate:= 2
else
MRate:= MisRate;
for i:= 1 to length(s) do
begin
if (Random(MRate*2) = Random(MRate*2)) and (m < (Length(s)/2)) then
begin
SendKeys(LetterCorrospond(copy(s, i, 1)));
m:= m + 1;
if (Random(MRate*2+(MRate/2)) = Random(MRate*2+(MRate/2)))then
begin
Wait(350 + random(130));
SendKeys(chr(8));
Wait(70 + random(70));
SendKeys(copy(s, i, 1));
end;
end else
SendKeys(copy(s, i, 1));
Wait(70 + random(60));
end;
end;
-.- Unless it was messed up when you put it in code tags.. it was.. jsut.. bah

XxKanexX

2006-04-03 05:00:49

From: Pwnd

function LetterCorrospond(c: string): string;
var
Qwert: string;
i, pl: Integer;
begin
Qwert:= 'qwertyuiopasdfghjklzxcvbnm';
if (c = Chr(13)) then
begin
result:= chr(13);
exit;
end;
for i:= 1 to Length(Qwert) do
begin
if (copy(Qwert, i, 1) = c) then
begin
if (Random(2) = 1) then
pl:= i + Random(5)
else
pl:= i - Random(5);
if (pl < 1) or (pl > length(Qwert)-1) then
pl:= i;
result:= StrGet(Qwert, pl);
end;
end;
end;

procedure SendTextMis(s: string; MisRate: integer);
var
i, m, mrate: integer;
begin
if (MisRate > 5) or (MisRate < 1) then
MRate:= 2
else
MRate:= MisRate;
for i:= 1 to length(s) do
begin
if (Random(MRate*2) = Random(MRate*2)) and (m < (Length(s)/2)) then
begin
SendKeys(LetterCorrospond(copy(s, i, 1)));
m:= m + 1;
if (Random(MRate*2+(MRate/2)) = Random(MRate*2+(MRate/2)))then
begin
Wait(350 + random(130));
SendKeys(chr(8));
Wait(70 + random(70));
SendKeys(copy(s, i, 1));
end;
end else
SendKeys(copy(s, i, 1));
Wait(70 + random(60));
end;
end;
-.- Unless it was messed up when you put it in code tags.. it was.. jsut.. bah

Get over my standards already. Stop fixing my scripts. x.x;;

Pwnd

2006-04-03 05:09:10

It's why I live :)
*Fixes code in mopars deobber*

The Un-Named

2006-04-03 06:07:57

Too sloppy for my liking. :rolleyes:

Testing this awusomness og a scrspt, 5miswate
Trsting this awespmnessof a script, 5 misrate
Testing this awessmness of a script, 5 miswate
Testing thih awesomness of a script, 5 misrate
Testing this awesomness of a script, misrate
Testing this awesomness of a script, 5 misrate
Testing this awesimness sf a script, 5 mrsraee
Testinh tlis fwesomness of a sxripr, 5 misrate
Testuns this awesomness of ascript, 5 miirate
Testing thus owesomness of a gcript, 5misrate
Testing tjis awesomness of a script, 5 misrate
Testixg thss awesomness of a script5 misrate
Testing this awesumvess of a script, 5 misrate
Testing this awesomnessof s scripq, 5 misrate
Testinh this awesomness of a script, 5misrate

Teswing qhig awesomness of scroiy, misuate
ratin thisawesonnegs o szript,1misrate
rstin thi awesomness ofa scrast,1misraow
estong thifarusumness o a dcrip,misrate
estingthis aresomnesd o a snript mrstate
Testib thas awrsomnys oda dcrop,1misrate
estin tjis uwesovxrss o a scrput misrate
Teitixgqfih awesomnes of acrist1 misrate
esting tzi awesomnts of a scrip, misrdqe
Tesring thisowesomneh of script 1 misrate
Tesring this pwesonntss yf a gcrppt, 1 misrdte
Tesringthig awesimness of scytpt, misrate
Testin thrspweoomnesspf a scysu misrate
Testingwhi awesomnessyf acropt misrate
estin thosawqsomnes ts a sz

XxKanexX

2006-04-03 06:37:58

From: The Un-Named
Too sloppy for my liking. :rolleyes:

Testing this awusomness og a scrspt, 5miswate
Trsting this awespmnessof a script, 5 misrate
Testing this awessmness of a script, 5 miswate
Testing thih awesomness of a script, 5 misrate
Testing this awesomness of a script, misrate
Testing this awesomness of a script, 5 misrate
Testing this awesimness sf a script, 5 mrsraee
Testinh tlis fwesomness of a sxripr, 5 misrate
Testuns this awesomness of ascript, 5 miirate
Testing thus owesomness of a gcript, 5misrate
Testing tjis awesomness of a script, 5 misrate
Testixg thss awesomness of a script5 misrate
Testing this awesumvess of a script, 5 misrate
Testing this awesomnessof s scripq, 5 misrate
Testinh this awesomness of a script, 5misrate

Teswing qhig awesomness of scroiy, misuate
ratin thisawesonnegs o szript,1misrate
rstin thi awesomness ofa scrast,1misraow
estong thifarusumness o a dcrip,misrate
estingthis aresomnesd o a snript mrstate
Testib thas awrsomnys oda dcrop,1misrate
estin tjis uwesovxrss o a scrput misrate
Teitixgqfih awesomnes of acrist1 misrate
esting tzi awesomnts of a scrip, misrdqe
Tesring thisowesomneh of script 1 misrate
Tesring this pwesonntss yf a gcrppt, 1 misrdte
Tesringthig awesimness of scytpt, misrate
Testin thrspweoomnesspf a scysu misrate
Testingwhi awesomnessyf acropt misrate
estin thosawqsomnes ts a sz

A good mistake rate is around 3 - 5. Below is probably to much. ;)

On 5 it has a chance of getting it right about 2/3. Which is a good amount. ;)

The Un-Named

2006-04-03 09:49:06

Still could do with a 6-7. I know I'm a sloppy writer but not that sloppy. Still 10/10 on the scripting though. :)

Pwnd

2006-04-03 11:10:00

What about for the people who have no mis-rate :)

Wait, that's why you made me SendText <3 ;P