From: J J
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,False,False,0,2,0,50,True,tr_NormalChars));
TypeSend('/'+GetName+'rolled '+y+' on two six-sided dice.');
wait(randomrange(2000,3000));
end;
end;