• Log in or sign up for an account here: https://www.sythe.org/login

[SRL4] AutoClicker

Status
Not open for further replies.
Joined
Jan 27, 2007
Sythe Gold
0
Messages
1,225
Location
/bin/sh
Code:
program AutoClicker;
{.include /SRL/SRL.scar}
var
x,y,betweenclicks:integer;
procedure setup;
begin;
betweenclicks:=5; //How many seconds between clicks
// Don't touch \\
betweenclicks := betweenclicks * 1000;
end;
begin
setup;
repeat
GetMousePos(x,y);
mouse(x,y,1,1,true);
sleep(betweenclicks + random(50));
until(isfkeydown(12))
end.
 
Code:
program AutoClicker;
{.include /SRL/SRL.scar}
var
x,y,betweenclicks:integer;

const
betweenclicks=5; //How many seconds between clicks
procedure setup;
begin
// Don't touch \\
betweenclicks := betweenclicks * 1000;
end;
begin
setup;
repeat
GetMousePos(x,y);
mouse(x,y,1,1,true);
sleep(betweenclicks + random(50));
until(isfkeydown(12))
end.

You probably want to use Wait() instead of Sleep().
 
Failed when compiling
Line 4: [Error] (14453:1): Duplicate identifier 'x' in script

I'm a newbie lol how do you fix that?
 
Failed when compiling
Line 4: [Error] (14453:1): Duplicate identifier 'x' in script

I'm a newbie lol how do you fix that?

Get the newest SRL.

Code:
program AutoClicker;
{.include /SRL/SRL.scar}
var
x,y,betweenclicks:integer;

const
betweenclicks=5; //How many seconds between clicks
procedure setup;
begin
// Don't touch \\
betweenclicks := betweenclicks * 1000;
end;
begin
setup;
repeat
GetMousePos(x,y);
mouse(x,y,1,1,true);
sleep(betweenclicks + random(50));
until(isfkeydown(12))
end.

You probably want to use Wait() instead of Sleep().

Can you explain why?
 
I was hoping you wouldn't ask that. . .

Sleep() pretty much just shuts everything down for however long.

Wait() gives the script time to recover, reduces lag, etc.

If you have no waits in a loop then you may have some lag issues.
 
Okay. Do you know the Delphi code for wait()? Because I pretty much thought they were the same, since I'm comfort with VB.
Code:
Function wait(ms)
for i = 1 to ms 
sleep(1)
next i
end function
You've got to do the declares, ofcourse.
 
Nope, I've never tried scripting in Delphi even though I'm sure I could with a little work.
 
Dang i got error.. so ill use my .exe autotyper then
 
and i need to learn how to autoclick for killing chickens and fishing
 
Line 4: [Error] (17665:1): Duplicate identifier 'x' in script
wtf?
 
Line 7: [Error] (14688:1): Duplicate identifier '' in script wtf!
 
dang the mouse just goes to one of the corners of the screen instead of clicking
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top