SRL Archive - OSR Help

Mouse Movement Question


jollyjumbuck

2010-03-23 05:09:30

Hi

Can someone please explain why Mouse and MMouse on some of my scripts move extremely slowly (and "obviously"….ie non human like) to the destination whereas the same piece of code in another script will have the mouse movement at a 'normal' speed. Note - I have not played around with MouseSpeed at all so both instances are working off the default?

Thanks

i luffs yeww

2010-03-23 05:16:17

Make sure you have SetupSRL right after you start the mainloop. And {.include SRL/SRL.scar} at the top of the script. :)

jollyjumbuck

2010-03-23 05:26:14

Hi yeww - thanks for the speedy reply.

Yes both of those things were in place in all scripts and still get the creeping mouse in some but not others. Seems to happen even more regularly in simple dedicated single use test scripts which you would think would be pretty straight forward.

i luffs yeww

2010-03-23 06:32:58

Can you show me the scripts? :o

Put them in
 tags. :)

jollyjumbuck

2010-03-23 08:28:25

yes sure - see below. This script is here in its entirety and was for testing a piece to go into a larger script and the MMouse movement is doing the crazy super slow crawl thing in this stand alone script.

OK….just saw what might be the problem and looks like you were right the first with the first suggestion….had the SetupSRL in the wrong position….beginners error….my apologies! (not sure if I have the code tags right in this message either…?)




program CheckBank;

{.include SRL\SRL.Scar}

var
x,y:integer;

const
Color=1654839;

Procedure CheckBankOpen;
begin
MMouse(400,200,40,100);
FindColorTolerance(x, y, Color, 675, 90, 715, 130, 12)
if(x>670) then
begin
Writeln('Bank Open');
exit;
end else
begin
Writeln('Bank Not Open');
TerminateScript;
end;
end;

begin
SetupSRL; // Needs to go here on main loop!!!!!
CheckBankOpen;
Writeln('should only be here if bank was open');
end.


i luffs yeww

2010-03-23 18:04:10

So now that you fixed the mainloop, does it work? :)

jollyjumbuck

2010-03-24 19:37:07

Sure does. Thanks so much for your help!