SRL Archive - Scripting Help

Speed up TypeSend


EyYo96

2014-08-30 06:14:49

Hello, TypeSenEx is very slow, I want to make it faster, like an auto-typer. It's for rsps so it dosn't matter.
I tried to change the TypeSendEx code but it did not work.
I would prefer a solution in which nothing needs to be changed in the TypeSendEx code because other people can not use it then.

Thanks in advance :)

The Mayor

2014-08-30 06:38:50

From: EyYo96
Hello, TypeSenEx is very slow, I want to make it faster, like an auto-typer. It's for rsps so it dosn't matter.
I tried to change the TypeSendEx code but it did not work.
I would prefer a solution in which nothing needs to be changed in the TypeSendEx code because other people can not use it then.

Thanks in advance :)



sendKeys('message', 5, 1);

EyYo96

2014-08-30 06:56:13

Thanks for your fast reply!
Thats what I want :P But how can i enter the text?

The Mayor

2014-08-30 07:14:16

From: EyYo96
Thanks for your fast reply!
Thats what I want :P But how can i enter the text?


Since this is for a private server and I'm feeling generous:


program something;
{$I SRL-OSR/SRL.Simba}

var
Message: array of string;




{------------------------------------------------------------------------------)
SETUP
(------------------------------------------------------------------------------}

const

WAIT_TIME = 500; { Time to wait between each message }
{ 1000 = 1 second }

NUMBER_OF_MESSAGES = 5; { Number of messages you are typing }

procedure setupMessages();
begin

Message[0] := 'Type here 1';
Message[1] := 'Type here 2';
Message[2] := 'Type here 3';
Message[3] := 'Type here 4';
Message[4] := 'Type here 5';


// Message[5] := 'Type here 6'; { You can un-comment these if you want to use }
// Message[6] := 'Type here 7'; { more than 5 messages. Make sure you change }
// Message[7] := 'Type here 8'; { the NUMBER_OF_MESSAGES above to the correct }
// Message[8] := 'Type here 9'; { number. }
// Message[9] := 'Type here 10';
end;

{------------------------------------------------------------------------------)
END OF SETUP
(------------------------------------------------------------------------------}

procedure typeMessages();
var
i: integer;
begin
for i := 0 to high(Message) do
begin
typeSend(Message[i]);
wait(WAIT_TIME);
typeByte(VK_RETURN);
end;
end;

begin
clearDebug();

setLength(Message, NUMBER_OF_MESSAGES);
setupMessages();

repeat

typeMessages();

until(false);

end.

TypeSend is a SRL function. You will need to have SRL-OSR installed if you haven't already. If not, read the OSR help/setup section.