SRL Archive - SRL Archives

Typesend


Naike

2009-05-27 02:16:40

Small change..
Added TypeSendEx, Basicly Typesend with a boolean(PressEnter).

Self explained.


{*******************************************************************************
procedure TypeSendEx(Text: string; PressEnter: Boolean);
By: SKy Scripter small edit by N1ke!
Description: Sends human like text.
*******************************************************************************}
procedure TypeSendEx(Text: string; PressEnter: Boolean);
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(40 + Random(40));
while(Pos(Text[i], S) > 0)and(I <= Length(Text))do
begin
C := GetKeyCode(StrGet(Text, I));
TypeByte(c);
I:= I + 1;
if(I > Length(Text))then Break;
end;
end;
if(Shift)then
KeyUp(VK_SHIFT);
Wait(40 + Random(40));
if(I <= Length(Text))then
begin
C:= GetKeyCode(StrGet(Text, I));
TypeByte(C);
Wait(40 + Random(40));
end;
end;
If Not PressEnter Then Exit;
C := GetKeyCode(Chr(13));
TypeByte(C);
end;

{*******************************************************************************
procedure TypeSend(Text: string);
By: SKy Scripter modified by N1ke!
Description: Sends human like text.
*******************************************************************************}
procedure TypeSend(Text: string);
begin
TypeSendEx(Text, True);
end;

Cazax

2009-05-27 02:17:36

You are breaking many scripts, why don't just rename it to TypeSendEx?

Naike

2009-05-27 02:26:03

Look again ;)

mormonman

2009-05-27 02:27:49

Well, it wouldn't be typesend then would it?

Shuttleu

2009-05-27 02:28:35

i say yes

~ahut

noidea

2009-05-27 02:40:18

From: mormonman
Well, it wouldn't be typesend then would it?


No.
So maybe just 'Procedure Type(s : String;);'

Nava2

2009-05-27 04:00:45

Whats the point of this..?

ZaSz

2009-05-27 04:09:02

type like a human without pressing enter.

Da 0wner

2009-05-27 06:18:31

From: noidea
No.
So maybe just 'Procedure Type(s : String;);'


Lol…no.
Type is a reserved word.

Also, I have a procedure like this already, http://villavu.com/forum/showthread.php?t=42181.

Nava2

2009-05-27 07:25:13

Why would anyone do this?

Naike

2009-05-27 09:32:09

Can be used for everytime you don't need enter…
Kinda annoying to always have the enter, No?
What if i don't need that darn enter?

This is not breaking any scripts at all.

Miitchyy

2009-05-27 13:14:58

It's not a bad idea Nike, It would be good for searching the bank, if you wanted to randomize a person's attentiveness.

Eg.
Only type in much of a string before the "person" 'realises' that they found their item.

ShowerThoughts

2009-05-27 19:42:54

People, please try to read, before you reply :).

Da 0wner

2009-05-28 01:41:54

Umm, what are you talking about? All posts here are on topic and relevant.

NiCbaZ

2009-05-30 07:29:01

From: Da 0wner
Umm, what are you talking about? All posts here are on topic and relevant.


Don't worry about him he try's to be a mod at least 1 time a day.


Good idea, in some scripts i have had to copy typesend into my script and take away the enter.

Good idea :_)

Daniel

2009-05-30 07:40:33

Sometimes i tend to write a full sentence then delete it, in many occasions ;)

Gu3st...

2009-05-30 10:59:13

From: NiCbaZ
Don't worry about him he try's to be a mod at least 1 time a day.


Good idea, in some scripts i have had to copy typesend into my script and take away the enter.

Good idea :_)


From: Kevin Wolf aka Miitchyy
It's not a bad idea Nike, It would be good for searching the bank, if you wanted to randomize a person's attentiveness.

Eg.
Only type in much of a string before the "person" 'realises' that they found their item.


[quote=Dan's The Man;577069]Sometimes i tend to write a full sentence then delete it, in many occasions ;)[/quote]

All these are good examples there you would need this procedure… I say [B]yes[/B], I think it would be good to have this procedure in srl

Nava2

2009-05-30 21:55:54

Committed.

JAD

2009-05-30 22:34:49

Last time I checked (like over a year ago) there was an SRL function called SendText that does the same thing as TypeSend without pressing enter? Maybe it was removed idk.

Edit:


{*******************************************************************************
procedure SendText(Text: String);
By: RSN
Description: Types text humanlike.
*******************************************************************************}

procedure SendText(Text: string);
var
i: Integer;
begin
for i := 1 to Length(Text) do
begin
SendKeys(Text[i]);
Wait(50 + Random(100));
end;
end;

Hugolord

2009-05-30 22:38:52

I pretty sure SendKeys does that.. (but it's a lot faster so I dunno if it has anti-ban)

JAD

2009-05-30 22:41:52

From: Hugolord
I pretty sure SendKeys does that.. (but it's a lot faster so I dunno if it has anti-ban)


SendKeys isn't an SRL command. It's like using MoveMouse/ClickMouse.

SendText is an SRL function. It doesn't instantly type the text, it does it human like, just like typesend, but without the enter key.

ZephyrsFury

2009-05-30 22:57:35

SendText was removed in Rev #10 or something.

Da 0wner

2009-05-31 00:27:26

Does SendKeys have random waits in between keys?

ZephyrsFury

2009-05-31 08:05:51

Nope. It sends the keys instantly.

Da 0wner

2009-05-31 08:25:02

Exactly, so SendText is detectable.

ian.

2009-05-31 08:27:56

From: ZephyrsFury
SendText was removed in Rev #10 or something.


>.> Da 0wner.

Da 0wner

2009-05-31 08:30:13

I read that already. I was telling them why it was removed.

Nava2

2009-05-31 09:05:13

From: Da 0wner
I read that already. I was telling them why it was removed.


The function was posted. I'm sure it was removed with the addition of TypeSend.

Da 0wner

2009-05-31 09:11:56

I know the function was posted…and yea I am also thinking that it was removed when they made TypeSend.

ZephyrsFury

2009-05-31 14:14:13

No TypeSend and SendText were both there at the same time. It just got removed when the developers did a clean up of SRL to remove duplicate/obsolete functions etc.