can someone please tell me how i can make scar do 2 actions at the same time such as moving the mouse forward and clicking (at the same time)
can someone please tell me how i can make scar do 2 actions at the same time such as moving the mouse forward and clicking (at the same time)
SCAR Code:while (?) do
?
Of course that wouldn't work for movemouse.
SCAR isn't capable of Multi Threading atm.
So you cant do that![]()
If you mean holding the mouse and dragging it, then here's an example:
SCAR Code:program Example;
{.include SRL\SRL.scar}
var
x, y: Integer; //to get Mouse Position after you move the mouse
begin
SetupSRL;
//then somewhere in the script you want to drag the mouse
HoldMouse(100, 200, true); //start holding mouse (left)
Wait(10 + random(20)); //always have waits
MMouse(500, 400, 3, 3); //move the mouse
Wait(10 + random(20));
GetMousePos(x, y); //get the mouse position (because MMouse has a little randomness)
ReleaseMouse(x, y, true); //release mouse (left)
//and the rest of the script
end.
Now, if you want to actually click while moving the mouse you'd have to set up something wherein the script clicks after it moves every "x" pixels.
For example:
SCAR Code:program Example;
{.include SRL\SRL.scar}
var
x, y: Integer; //to store the original x/y coords
i: Integer; //to count the loop
begin
SetupSRL;
//then somewhere in the script you want to click while moving
for i:= 0 to 100 do
begin
GetMousePos(x, y); //get mouse position
Mouse(x + 2, y + 2, 0, 0, true); //move mouse two units from current position for x/y and click mouse (left)
Wait(100 + random(200));
end;
//and the rest of the script
end.
There are currently 1 users browsing this thread. (0 members and 1 guests)