Log in

View Full Version : Speed up TypeSend



mrlewcc
07-02-2012, 07:26 PM
Hello guys I am trying to make typesend send keys faster however I cannot find a way how, is there a way of making a quick respond of text after something is said due to it says things really too slow.

Thanks :)

J J
07-02-2012, 08:28 PM
You could have looked into the code of TypeSendEx :P

procedure TypeSendEx(Text: string; PressEnter: Boolean);
var
I: Integer;
begin
for i := 1 to Length(Text) do
begin
{$IFDEF SIMBAMAJOR980}
SendKeys(Text[i], 40 + Random(40));
{$ELSE}
SendKeys(Text[i], 30 + Random(30), 30 + Random(30));
{$ENDIF}
Wait(40 + Random(40));
end;

if (PressEnter) then
TypeByte(VK_RETURN);
end;

As you can see it waits pretty long, you can just make your own short version like this:

procedure TalkFast(Text: String; PressEnter: Boolean);
var
i: Integer;
begin
for i:=1 to Length(text) do
SendKeys(Text[i], 2 + Random(2));

if (PressEnter) then
TypeByte(VK_RETURN);
end;

:)

grats
07-02-2012, 08:33 PM
Also one of the biggest things to make sure it responds quickly: make sure you're checking for the chat text somewhere in your most used loop, this way it detects chat text quickly and starts to respond as soon as possible (like a human would)

mrlewcc
07-02-2012, 09:25 PM
You could have looked into the code of TypeSendEx :P

procedure TypeSendEx(Text: string; PressEnter: Boolean);
var
I: Integer;
begin
for i := 1 to Length(Text) do
begin
{$IFDEF SIMBAMAJOR980}
SendKeys(Text[i], 40 + Random(40));
{$ELSE}
SendKeys(Text[i], 30 + Random(30), 30 + Random(30));
{$ENDIF}
Wait(40 + Random(40));
end;

if (PressEnter) then
TypeByte(VK_RETURN);
end;

As you can see it waits pretty long, you can just make your own short version like this:

procedure TalkFast(Text: String; PressEnter: Boolean);
var
i: Integer;
begin
for i:=1 to Length(text) do
SendKeys(Text[i], 2 + Random(2));

if (PressEnter) then
TypeByte(VK_RETURN);
end;

:)

How do I get that to work with this though?
procedure Betting;
Var
y : string;
GetName : string;
begin
if (inchat('!Roll')) Then
begin
y:=IntToStr(RandomRange(2,12));
GetName:=Trim(GetTextAtEx(70,440,55,SmallChars,Fal se,False,0,2,0,50,True,tr_NormalChars));
TypeSend('/'+GetName+'rolled '+y+' on two six-sided dice.');
wait(randomrange(2000,3000));
end;
end;

Home
07-02-2012, 09:27 PM
How do I get that to work with this though?
procedure Betting;
Var
y : string;
GetName : string;
begin
if (inchat('!Roll')) Then
begin
y:=IntToStr(RandomRange(2,12));
GetName:=Trim(GetTextAtEx(70,440,55,SmallChars,Fal se,False,0,2,0,50,True,tr_NormalChars));
TypeSend('/'+GetName+'rolled '+y+' on two six-sided dice.');
wait(randomrange(2000,3000));
end;
end;

Replace TypeSend with TalkFast(........., True);

~Home

mrlewcc
07-02-2012, 09:32 PM
Ah I was missing the true!

Thank you all very much <3

Daniel
07-03-2012, 12:46 PM
As you can see it waits pretty long, you can just make your own short version like this:

procedure TalkFast(Text: String; PressEnter: Boolean);
var
i: Integer;
begin
for i:=1 to Length(text) do
SendKeys(Text[i], 2 + Random(2));

if (PressEnter) then
TypeByte(VK_RETURN);
end;

The second wait is there for a reason. ;)