SRL Archive - SRL Archives

MMouseItem procedure


Cigue

2009-12-21 14:44:43

EDIT : InvMouse is at cause here, sorry for wrong thread title.

While testing one of my scripts Dub pointed to me that MMouseItem often missed inventory slots. If I find a way to make it not miss at all, would you add it to SRL dev?


A second thought about the procedure, though this one might be overkill. When clicking a hundred times, InvMouse will usually click the following places (assuming the item is 5 pixels by 5 pixels)

44444
44444
44444
44444
44444

While a human will do something like :

12521
25752
57975
25752
12521

(Note : this doesn't adds up to 100, it's a rough estimate)

I am going to try to design a function that corrects this.

Your thoughts?

Wanted

2009-12-21 15:07:52

wat

{.Include SRL\SRL.SCAR}

var
I: Byte;

begin
SetUpSRL;
ActivateClient;
Wait(1000);
for I := 1 to 28 do
begin
InvMouse(I, 3);
Wait(RandomRange(250, 500));
end;
end.