Log in

View Full Version : [Error] (4:26): Type mismatch at line 3 Compiling failed.



Gaston7eze
12-19-2011, 02:16 PM
program new;
begin
ClickMouse(50, 780, True);
end.
This is an Example,i cant use the procedure of Boolean.
If i use "MoveMouse(80,90) it works but if i use "ClickMouse" it dont work.
Thanks for the Help
How can i Get this to work?

RISK
12-19-2011, 02:19 PM
Why not use MMouse and Mouse? :) They are SRL's inbuilt mousing functions.

procedure MMouse(x, y, rx, ry: integer);
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);

rx, ry are the randomization in the pixels from the original X and Y values.

MMouse(10, 10, 5, 5);
Mouse(10, 10, 5, 5, True);

Gaston7eze
12-19-2011, 02:20 PM
What does "Mouse" make?Thanks for the help bro.

Kyle Undefined
12-19-2011, 02:21 PM
If this is for RS, you will want to use "MMouse();" to move the mouse and "Mouse();" to click.

However, to answer your question, changed "True" to "1" in ClickMouse(). It uses an Integer instead of Boolean.

EDIT: :ninja:'d

RISK
12-19-2011, 02:21 PM
It moves the mouse to the X and Y values (with randomization with ranx and rany) and then clicks the left mouse button or the right mouse button depending on "Left".
True = Left click,
False = Right click. :)

@ Kyle : Ninja much, bro? D:

Gaston7eze
12-19-2011, 02:25 PM
Sorry,im new to this and im trying to understand so i can make scripts for the community.Thanks.
program new;
begin
MMouse(80,90, 1);
end.
Now should look like this or what?

RISK
12-19-2011, 02:26 PM
It should be this:
MMouse(80, 90, 1, 1, True);

1, 1 = The randomization in the coordinates given.
True = left clicks.

Don't be sorry. :o We love to help and we don't mind questions!

Gaston7eze
12-19-2011, 02:29 PM
It should be this:
MMouse(80, 90, 1, 1, True);

1, 1 = The randomization in the coordinates given.
True = left clicks.

Don't be sorry. :o We love to help and we don't mind questions!
Thanks for the help Friend!You are a nice person.Let me try it.

Gaston7eze
12-19-2011, 02:30 PM
It should be this:
MMouse(80, 90, 1, 1, True);

1, 1 = The randomization in the coordinates given.
True = left clicks.

Don't be sorry. :o We love to help and we don't mind questions!

Got this error :
[Error] (4:1): Unknown identifier 'MMouse' at line 3
Compiling failed.

What should i do?It could be that i dont have a Plugin?Or an Extension?

RISK
12-19-2011, 02:31 PM
Add this to the top of your script under "program new;":
{$i SRL/SRL.scar}

Also make sure you have the SRL include.

Gaston7eze
12-19-2011, 02:32 PM
Add this to the top of your script under "program new;":
{$i SRL/SRL.scar}

Also make sure you have the SRL include.

The script:
program new;
{$i SRL/SRL.scar}
begin
MMouse(80, 90, 1, 1, True);
end.

It shows me other error
This one:
[Error] (5:27): Invalid number of parameters at line 4
Compiling failed.

BraK
12-19-2011, 02:33 PM
You need to include SRL in the Script add:


{$i SRL/SRL.scar}

below the Program line at the top.

E: lol Ninja'd

MMouse only move the mouse use Mouse();

RISK
12-19-2011, 02:33 PM
Lol, oops. Remove the "True" in the MMouse. :duh:

@ BraK : Hi. :p

Gaston7eze
12-19-2011, 02:35 PM
You need to include SRL in the Script add:


{$i SRL/SRL.scar}

below the Program line at the top.

E: lol Ninja'd

MMouse only move the mouse use Mouse();

Thanks for the help but i already done that and got this error v[Error] (5:27): Invalid number of parameters at line 4
Compiling failed.

RISK
12-19-2011, 02:37 PM
Try "MMouse(80, 90, 1, 1);".

BraK
12-19-2011, 02:37 PM
Change MMouse to Mouse or remove the True.

Gaston7eze
12-19-2011, 02:37 PM
My Mouse stands in one place and it dont move from there.I try to move it but it continue standying in the same place.
Sorry for my bad english,i speak Spanish.!

RISK
12-19-2011, 02:38 PM
Add "SetupSRL;" before the MMouse. :)

Gaston7eze
12-19-2011, 02:39 PM
Add "SetupSRL;" before the MMouse. :)

Ahhhh!Thank you so much man!Add me.

RISK
12-19-2011, 02:40 PM
If you want to add my MSN: riskeditall@live.com

Gaston7eze
12-19-2011, 02:40 PM
One more Question,how can i make it to CLICK on one place?Thanks again!

RISK
12-19-2011, 02:41 PM
Mouse(80, 90, 1, 1, True);
True = Left click,
False = Right click

Gaston7eze
12-19-2011, 02:43 PM
[Error] (10:8): Unknown identifier 'Left' at line 9
Compiling failed.
I got that error
My script goes like this:


program new;
{$i SRL/SRL.scar}
begin
MoveMouse(800,45)
SetupSRL;MMouse(80, 90, 3, 70);
Wait(1000)
Mouse(80, 90, 1, 1, True);
True = Left click,
False = Right click
end.

RISK
12-19-2011, 02:45 PM
Remove the "True = Left click,
False = Right click".

I said those to tell you that putting "True" in your "Mouse" will make it left click and "False" will make it right click. :)

Gaston7eze
12-19-2011, 02:48 PM
Ohh i understand,Thank you so much!

Gaston7eze
12-19-2011, 02:52 PM
I have more question,should i as them to you RISK?

If you can answer , i am using the procedure "SendKey"What should i put¿?


Script:
program new;
{$i SRL/SRL.scar}
begin
MoveMouse(800,45)
SetupSRL;MMouse(80, 90, 3, 70);
Wait(1000)
Mouse(47, 1034, 1, 1, True);
Mouse(63,901,1,1, true)
Wait(2000)
SendKeys('My Computer');

end.

Error:
[Error] (12:24): Invalid number of parameters at line 11
Compiling failed.

RISK
12-19-2011, 02:53 PM
Try "TypeSend('My Computer');" instead of "SendKeys".

Gaston7eze
12-19-2011, 02:58 PM
Thanks man!