From: Rezozo
You sure you want that to be your script entirely? What I mean is right now, it set x, y, to 0,0 So…yea.
Plus, if that is all your script is going to do, Wont it be easier to put it like this:
program new;
{$DEFINE SMART}
{$I SRL/SRL.Simba}
{$i sps/sps.simba}
var
i: Integer;
var x, y: integer;
begin
x:=; {Choose an x coordinate}
y:=; {Choose a y coordinate}
repeat
if IsKeyDown(VK_Q) then
for i:=1 to 5 do
begin
ClickMouse(x, y, mouse_Left);
Wait(random(50));
end;
until(IsKeyDown(VK_E)); {Just to stop the script when you press E.}
end.
IDK, this is the first thing that came to mind :p I don't script that often, but I do love pascal.
~Rez
Thank you! This worked perfectly.
I am working on my next challenge, just modifying the script to do other things like pressing keyboard buttons.
How come it would press the 'enter key' or the 'control key', but not letter keys like 'a' or 'z' or 's'? That is strange….
I am modifying the part where it says:
begin
ClickMouse(x, y, mouse_Left);
Wait(random(50));
end;
to:
KeyDown(17);
wait(RandomRange(50, 100));
KeyDown(41);
Can anyone tell me why it won't press the letter A but it will press the control key?
Thanks.
EDIT:
I just solved my own problem,
PressKey(VK_B);
wait(RandomRange(50, 100));
PressKey(VK_B);
On to the next challenge now. Thank you.