what tuts have you been reading? 
I've never even heard of PerfectMouseEx 
I'm guessing you're trying to do this..
SCAR Code:
program MineRocks;
{.include SRL/SRL.scar}
const
RockColor = 54323;
procedure MineIt;
var
rx, ry: integer;
begin
if(FindColorTolerance(rx, ry, RockColor, MSX1, MSY1, MSX2, MSY2, 7))then
Mouse(rx, ry, 2, 2, True);
end;
begin
SetupSRL;
repeat
repeat
MineIt;
repeat
Wait(RandomRange(25, 50));
until(InvCount = InvCount + 1);
until(InvFull);
if(InvFull)then
DropAll;
until(IsFKeyDown(12));
end.
this is VERY basic..
all it will do is if it finds the color in the MAIN SCREEN (that's what MSX1, MSY1, MSX2, MSY2 are for) it will click on it, then wait until the inventory count is one more (which would be when it mined a rock or got a gem), and keep doing that until it gets a full load.. then it will drop everything (so wear your pickaxe.. if you can't let me know and I'll fix that
) then it will go back to mining..
it will keep doing that until you stop the script (Ctr + Alt + S) or if you press F12..
if you need more help.. talk to me on MSN 
panic._@live.com