SRL Archive - OSR Help

Mousebox?


All that is man

2009-03-29 21:55:36

What are you parameters because in my script that i'm making I have:

MouseBox(562, 341, 581, 357);
But it gives me the following error:
Line 31: [Error] (16237:29): Invalid number of parameters in script C:\Users\Brian\Desktop\Brian's Documents\Scar Scripts\My Scripts\AutoAlcher.scar
Even though I thought I had the the parameters right…Anyone know?

Harry

2009-03-29 22:33:09

{*******************************************************************************
procedure MouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
By: SKy Scripter and Nielsie95
Description: Moves mouse into a random position in the box. Clicks if told to.
*******************************************************************************}

procedure MouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : Mouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : Mouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
else
srl_Warn('MouseBox', 'ClickType is NOT a valid number!', warn_AllVersions);
end;
end;
You forgot what type of click you want for the 5th parameter. Choose 1 to click with the left mouse button (a normal click), 2 to click with the right mouse button, and 3 to just move the mouse there.

In the future, please check in the SRL includes before making a thread, thanks.

All that is man

2009-03-29 22:44:38

Sorry but thanks.

mastaLink

2010-11-04 16:27:31

For the record, the SCAR manual only lists the first four arguments (X1,Y1,X2,Y2). There is nothing about a fifth.

Harry

2010-11-04 18:59:11

From: mastaLink
For the record, the SCAR manual only lists the first four arguments (X1,Y1,X2,Y2). There is nothing about a fifth.

Please don't bump such an old thread :)

Anyways, there is a mouseBox command in SCAR, and only in SRL. SCAR's is not safe compared to SRL's.

ZephyrsFury

2010-11-05 04:31:09

SRL overrides SCAR's function. When you include SRL you have to use 5 params, otherwise just 4.