SRL Archive - OSR Help

Invalid number of parameters at line 3 Compiling failed.


tiggerred

2012-12-22 14:38:30

When ever I try to test my script i get this error.
Invalid number of parameters at line 3
Compiling failed.

program new;
begin
ClickMouse (456, 217);



end.

euphemism

2012-12-22 14:41:55

well, when you type the '(' after 'ClickMouse', a tool-tip should pop up that reads the following:


ClickMouse(x: LongInt;y: LongInt;clickType: LongInt);

ClickMouse has three parameters, x, y, and clickType: x and y are the coordinates of where to click, and clickType is the type of click (clickType is a constant, and the mouse constants for clicking would be mouse_Left, mouse_Right, or mouse_Middle).

Sin

2012-12-22 14:42:25

Don't use ClickMouse, us Mouse();

dudutzu

2012-12-22 16:43:17

More like :

MMouse(x,y,i,j); // x & y = the coordinates; i & j = +/- maximum pixels to variate; all values are integers.
Clickmouse2(btn); // btn is boolean : true = left click & false= right click

Ex (left click at 501 +/- 3px ; 200 +/- 3px) :

MMouse(501,200,3,3);
Wait(Random(10)); // a little extra that I use
ClickMouse2(true);

Hope it helped !