View Full Version : Help with sending message
Trying to make a script that sends keys.. Ihave this but it gives me error:
[Error] C:\Simba\Scripts\dicer.simba(11:1): Unknown identifier 'TypeSend' at line 10
Compiling failed.
code:
program Dice;
var
outcome: Integer;
procedure start;
begin
outcome := Random(100);
ClearDebug;
//TypeSend(Host is Rolling dice . . .);
Wait(1000);
TypeSend('I hope I dont lose . . .');
wait(800);
TypeSend('I has rolled a ' + IntToStr(outcome) + ' on the percentile dice.');
wait(400);
if outcome >= 55 then
Writeln('You win!');
if outcome <= 55 then
Writeln ('You lose!');
end;
begin
start;
end.
You need to include SRL at the start of the script, Typesend is a SRL function.
also consider changing "I has rolled" to "I have rolled" and "55" to "50"
after the program line include SRL with
{$i SRL/SRL.Simba}
how do i make it type faster lol?
Daniel
11-28-2012, 02:53 AM
how do i make it type faster lol?
If you open the TypeSend function declaration, you will notice that it makes a call to SendKeys. The default arguments it passes to this function for the minimum time a key is to be held down for, and an additional random time on top of that until it is released, is: 30 + Random(30), 30 + Random(30).
So, in your script, simply replace TypeSend with SendKeys, and have a lower wait time between keystrokes. For example, you could have:
SendKeys('Message', 20 + Random(20), 10 + Random(10)); // Quicker.
// or...
SendKeys('Message', 10 + Random(10), 5 + Random(5)); // Even quicker.
If you open the TypeSend function declaration, you will notice that it makes a call to SendKeys. The default arguments it passes to this function for the minimum time a key is to be held down for, and an additional random time on top of that until it is released, is: 30 + Random(30), 30 + Random(30).
So, in your script, simply replace TypeSend with SendKeys, and have a lower wait time between keystrokes. For example, you could have:
SendKeys('Message', 20 + Random(20), 10 + Random(10)); // Quicker.
// or...
SendKeys('Message', 10 + Random(10), 5 + Random(5)); // Even quicker.
How do i make that press enter i tried
SendKeys(vk_enter);
TypeByte();
SendKeys accept strings as argument only.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.