Not bad for a first script. Simple and effective. Anyway, there are some little problems.
Problem 1: Standards
The script needs to be formatted properly so it is easier to read. It might not seem important now, but if you get into a bad habit, more complicated scripts will be so much more complicated.
Problem 2: Names
The names of your procedures are a bit awkward, like Typpe. I know you can't have Type or Sleep, but you should try to use other names, such as TypeInput, or WaitProcedure, or something like that.
Anyway, I've sorted it out for you this time, but look through and see what I've done. If you don't get it, look at a tutorial to see how you should write scripts.
program autoTalker;
{.include srl/srl.scar}
{ ______ ____
/ ____/_______ ___ / __ \____ _ __
/ /_ / ___/ _ \/ _ \/ / / / __ \| |/_/
/ __/ / / / __/ __/ /_/ / /_/ /> <
/_/ /_/ \___/\___/_____/\____/_/|_|
Version 1.1
F9 stops writing and F10 resumes typing to stop the script
press F12.
This is my first autoTalker so enjoy it!
Post all comments and bugs.
Thanx!}
const
YourText = 'Type your text here'; // what to type
WaitTime = 2000; // How much to Wait to type next message
FastTalk = false;//Tre use the fast Talk and false uses human typing.
procedure Typpe;
begin
if FastTalk = true then
begin
SendKeys(YourText + chr(13));
end;
if FastTalk = false then
begin
TypeSend(YourText);
end;
end;
procedure Sleeep;
begin
if (IsFKeyDown(9)) then
begin
repeat
Wait(10);
Status('Waiting...press f10 to resume');
until(IsFKeyDown(10));
end;
end;
procedure Talk;
begin
repeat
Status('Typing');
Typpe;
Sleeep;
Wait(WaitTime+random(1000));
Sleeep;
until(IsFKeyDown(12));
WriteLn('F12 was pressed, terminating');
end;
begin
ActivateClient;
SetupSRL;
WriteLn('You are using FreeDox autoTalker');
Talk;
end.
Hope I could help! ;)
p.s. I've uploaded a fixed SCAR file too… :eek: lol