SRL Archive - Help and Support

Hmm...Intradesting, solutions?


PatDuffy

2011-12-29 19:57:26

Well for my POH Firemaker that was requested, I was almost done then I decided to convert it to SRL-5 before release. It seems InvMouse might have a small hiccup, but to be honest I'm not sure if it's not me doing something wrong.

What I have:
for I:=1 to 27 do
begin
if FindNormalRandoms then
if Not LoggedIn then
Exit;
InvMouse(I,2);
Wait(RandomRange(100,200));
if ChooseOption('ight') then
Wait(RandomRange(1820,1870));
if ExistsItem(I) then
begin
InvMouse(I,2);
wait(RandomRange(100,200));
if ChooseOption('ight') then
begin
writeln('attempting to burn a log again');
Wait(2000+Random(1000));
end;
end else

the error I get :

SRL Compiled in 0 msec
SMART Initialized.
Loaded: Server 97, Members: True, Signed: True, Super Detail: False.
burning
Error: Unknown mouse button in SmartHoldMouse at line 22
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

and the snippet that has the error:

procedure HoldMouse(x, y: Integer; button : integer);
begin
if button = mouse_left then
SmartHoldMouse(x, y, true)
else if button = mouse_right then
SmartHoldMouse(x, y, false)
else
raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMouse');
end;

The thing I don't get it, if I use InvMouse(I,1) to left-click, everything works great without errors, but I can't right-click. Did that function just change from SRL 4 to 5 so that you can't right click anymore? (I doubt it)

I'm quite perplexed at the moment.

HyperSecret

2011-12-30 09:15:15

To right click try,

InvMouse(I, 0);

Looking at the function to right click it needs a false value (0).

PatDuffy

2011-12-30 10:55:44

From: HyperSecret
To right click try,

InvMouse(I, 0);

Looking at the function to right click it needs a false value (0).


Ahh, so then InvMouse must have changed, thanks for that ilk try it in a bit.