SRL Archive - RS3 Outdated / Broken Scripts

Idea for the most humanlike autotyper?


Floor66

2009-07-04 21:36:15

At the start of the script, make a form where the user has to type in the senctence being said, while the script counts the time it takes for the user to type!

There you have your perfect waiting time, add a small random though.

AmIRite?

Bubix

2009-07-04 21:59:40

I think so :)
It is great idea two :)
so the every autotalker would have ronfomly onther time.
like text: I <3 SCAR!
Somone will do it in 3 sec som one in 10 lol

Awkwardsaw

2009-07-04 22:23:34

yeah, thats a good idea, is there a "ontype" event thing in scar forms?

Floor66

2009-07-04 22:24:45

Idk, I've never used forms *shame*. Maybe onKeyDown or something? Or just onChange or something?

Rich

2009-07-05 00:40:16

Is there a way to round a number to the nearest whole number, or convert an extended to an integer? Once I find that out, I'll be done.

Awkwardsaw

2009-07-05 00:43:03

floattoint, i think. if not its floattostr, strtoint

Sabzi

2009-07-05 00:48:57

from scar manual

function Round(e: Extended): LongInt;
Rounds and converts floating point number to integer.

Awkwardsaw

2009-07-05 00:49:55

well, that too :P

ZaSz

2009-07-05 00:51:15

Sometime i type a sentence mega fast, but as time goes on, I type slower. So make it go slower over time? Like every 30 seconds, take add a second?

Richard

2009-07-05 00:54:57

If you want a human-like auto talker, then this might be useful: http://villavu.com/forum/showthread.php?t=27941

Makes mistakes, quite human-like.

Floor66

2009-07-05 00:56:54

Yeah but this is about timing.

Camaro'

2009-07-05 01:21:33

Is this really worth it?

Rich

2009-07-05 01:29:47

This is what I've got so far, but it doesn't seem to work :/ Any ideas?

program New;
{.include SRL/SRL.scar}
var
T, G, L, Av : Integer;
S : string;

procedure TypeSendExWait(Text: string; PressEnter: Boolean; AvWait : Integer);
var
S: string;
I, L: Integer;
C: Byte;
Shift: Boolean;
begin
S:= 'ABCDEFGHIJKLMNOPQRSTUVWXZ' + '~!@#$%^&*()_+{}|:"<>?';
L := Length(Text);
for I:= 1 to L do
begin
Shift:= (Pos(Text[i], S) > 0);
if(Shift)then
begin
KeyDown(VK_SHIFT);
Wait(AvWait + Random(25));
while(Pos(Text[i], S) > 0)and(I <= Length(Text))do
begin
C := GetKeyCode(StrGet(Text, I));
TypeByte(c);
Wait(AvWait + Random(25));
I:= I + 1;
if(I > Length(Text))then Break;
end;
end;
if(Shift)then
KeyUp(VK_SHIFT);
Wait(AvWait + Random(25));
if(I <= Length(Text))then
begin
C:= GetKeyCode(StrGet(Text, I));
TypeByte(C);
Wait(AvWait + Random(25));
end;
end;
If Not PressEnter Then Exit;
C := GetKeyCode(Chr(13));
TypeByte(C);
end;

procedure WorkOut;
begin
WriteLn('Type your message in the box STRAIGHT AWAY!');
Wait(2500);
T:= GetSystemTime;
S:= ReadLn('Message');
G:= T - GetSystemTime - RandomRange(250, 500);
L:= Length(S);
Av:= Round(G/L);
TypeSendExWait(S, False, Av);
end;

begin
SetupSRL;
Workout;
end.

Nava2

2009-07-05 10:02:20

If you'd like, I can write a system up todo this.


Might consider adding this to SRL. It'll depend how really useful this is.

Da 0wner

2009-07-05 10:56:46

From: R1ch
Is there a way to round a number to the nearest whole number, or convert an extended to an integer? Once I find that out, I'll be done.


Round, Ceil, Floor, and Trunc.

And R1ch:

G:= GetSystemTime - t - RandomRange(250, 500);

Not t - GetSystemTime.

Rich

2009-07-05 13:26:56

Ah, yes…Thanks Da Owner. I'll swap it then see if it works.

EDIT:
program New;
{.include SRL/SRL.scar}
var
T, G, L : Integer;
S : string;
Av : Extended;

procedure TypeSendExWait(Text: string; PressEnter: Boolean; AvWait : Integer);
var
S: string;
I, L: Integer;
C: Byte;
Shift: Boolean;
begin
S:= 'ABCDEFGHIJKLMNOPQRSTUVWXZ' + '~!@#$%^&*()_+{}|:"<>?';
L := Length(Text);
for I:= 1 to L do
begin
Shift:= (Pos(Text[i], S) > 0);
if(Shift)then
begin
KeyDown(VK_SHIFT);
Wait(AvWait + Random(40));
while(Pos(Text[i], S) > 0)and(I <= Length(Text))do
begin
C := GetKeyCode(StrGet(Text, I));
TypeByte(c);
Wait(AvWait + Random(40));
I:= I + 1;
if(I > Length(Text))then Break;
end;
end;
if(Shift)then
KeyUp(VK_SHIFT);
Wait(AvWait + Random(40));
if(I <= Length(Text))then
begin
C:= GetKeyCode(StrGet(Text, I));
TypeByte(C);
Wait(AvWait + Random(40));
end;
end;
If Not PressEnter Then Exit;
C := GetKeyCode(Chr(13));
TypeByte(C);
end;

procedure WorkOut;
begin
WriteLn('Type your message in the box STRAIGHT AWAY!');
Wait(2500);
MarkTime(T);
S:= ReadLn('Message');
G:= TimeFromMark(T) - RandomRange(575, 1000);
L:= Length(S);
Av:= Round(G/L);;
TypeSendExWait(S, False, Av);
end;

begin
SetupSRL;
Workout;
end.

It works. Try it out, tell me what you think, then I'll improve it.

EDIT: Use new one below!

Da 0wner

2009-07-05 13:31:48

Tested, still doesn't. But that is how you get the time passed :p.

Rich

2009-07-05 15:50:30

What doesn't work about it? It worked fine for me…

Da 0wner

2009-07-05 16:01:51

Nevermind, works now. But I might have been testing one you had originally :p.

Rich

2009-07-05 16:27:45

Probably. What do you think of it? Do you think it matches what Floor wanted?

Da 0wner

2009-07-05 16:33:35

Yes.

So this would be used when starting a script to calculate the ideal waiting time for typing things?

Rich

2009-07-05 16:47:53

Most probably. I might be able to make it type slower depending on the amount of message it has typed. I'll do that after I've had some lunch.

Richard

EDIT: I can't get it to slow down. I'll come to me how to do it later. Anyway, for now, I've fixed a bug:
program New;
{.include SRL/SRL.scar}
var
T, G, L, Av : Integer;
S : string;

procedure TypeSendExWait(Text: string; PressEnter: Boolean; AvWait : Integer);
var
S: string;
I, L : Integer;
C: Byte;
Shift: Boolean;
begin
S:= 'ABCDEFGHIJKLMNOPQRSTUVWXZ' + '~!@#$%^&*()_+{}|:"<>?';
L := Length(Text);
for I:= 1 to L do
begin
Shift:= (Pos(Text[i], S) > 0);
if(Shift)then
begin
KeyDown(VK_SHIFT);
Wait(AvWait + Random(40));
while(Pos(Text[i], S) > 0)and(I <= Length(Text))do
begin
C := GetKeyCode(StrGet(Text, I));
TypeByte(c);
Wait(AvWait + Random(40));
I:= I + 1;
if(I > Length(Text))then Break;
end;
end;
if(Shift)then
KeyUp(VK_SHIFT);
Wait(AvWait + Random(40));
if(I <= Length(Text))then
begin
C:= GetKeyCode(StrGet(Text, I));
TypeByte(C);
Wait(AvWait + Random(40));
end;
end;
If Not PressEnter Then Exit;
C := GetKeyCode(Chr(13));
TypeByte(C);
end;

procedure WorkOut;
begin
WriteLn('Type your message in the box STRAIGHT AWAY!');
Wait(2500);
MarkTime(T);
S:= ReadLn('Message');
G:= TimeFromMark(T) - RandomRange(575, 1000);
L:= Length(S);
Av:= Round(G/L);
TypeSendExWait(S, False, Av);
end;

begin
SetupSRL;
ClearDebug;
Workout;
end.

Floor66

2009-07-05 22:52:03

Can't we make something like:


procedure WorkOut;
begin
WriteLn('Type your message in the box STRAIGHT AFTER YOU PRESS F12!');
if(IsFKeyDown(12)) then
begin
MarkTime(T);
S:= ReadLn('Message');
G:= TimeFromMark(T) - RandomRange(575, 1000);
L:= Length(S);
Av:= Round(G/L);
TypeSendExWait(S, False, Av);
end;
end;

Rich

2009-07-08 23:02:21

If anyone is still interesting in this, then here's a link.

Nadeem

2009-07-08 23:21:43

Floor66, when I first read your post I thought you meant a time differentiate between each key stroke..?


procedure WorkOut;
begin
WriteLn('Type your message in the box STRAIGHT AFTER YOU PRESS F12!');
if(IsFKeyDown(12)) then
begin
MarkTime(T);
S:= ReadLn('Message');
G:= TimeFromMark(T) - RandomRange(575, 1000);
L:= Length(S);
Av:= Round(G/L);
TypeSendExWait(S, False, Av);
end;
end;

That is just taking how long it took the user the write that sentence, I know you can divide the time by the length of the string they typed, but I was hoping for something more complicated and interesting such as recognizing the certain characters the user types faster than some of the others, for example: people tend to type faster the keys asdfghjkl, and slow down a bit whilst typing numbers, special characters and the top row of keys. (I'm not saying this would apply to everyone).



~NS

Rich

2009-07-08 23:29:05

Nadeem, I see what you are saying, but surely this is more human-like than the current TypeSend?

Nadeem

2009-07-08 23:35:04

Well ofcourse it is :p

But if we are going to do it, we might aswell make it as best as possible.



~NS

The Little

2009-07-09 00:37:22

Now that would pretty much be the perfect autotyper, would love to work on it but will probably have to learn some more before I can actually do something usefull :(.

Would be cool to, when/if this ever gets done, make some sort of test, two vids, one with the autotyper and one with a human. See if you can see which one is the macro and which is the human :P

Feroc1ty

2009-07-10 02:36:05

You could definitely tell which one is a human, these things type at a constant rate, while people sometimes pause after some words to gather their thoughts.

Nadeem

2009-07-10 02:44:54

From: Feroc1ty
You could definitely tell which one is a human, these things type at a constant rate, while people sometimes pause after some words to gather their thoughts.


That is why I suggested what I have suggested :p And each human has a bit different rate at which they do this, so taking a quick typing test when first using this feature would be a key to solving a new speed and rhythm :D



~NS

Feroc1ty

2009-07-10 02:50:38

From: Nadeem
That is why I suggested what I have suggested :p And each human has a bit different rate at which they do this, so taking a quick typing test when first using this feature would be a key to solving a new speed and rhythm :D



~NS


The time it takes to press certain keys and the time it takes about what you're gonna type next are two different things.

Nadeem

2009-07-10 03:54:41

From: Feroc1ty
The time it takes to press certain keys and the time it takes about what you're gonna type next are two different things.


I guess I misunderstood, didn't I? :D This calls for an easy random boolean event. The pauses will be just the easy addon feature :)

Example:

You want to type "Time to test this autotyper"

"tT [BACKSPACEx2] Time to test aut[PAUSE][BACKSPACEx3] this autotyper"
Based on your unique rhythm.

I'm planning to start this tonight



~NS