Results 1 to 7 of 7

Thread: Mouse Movement Question

  1. #1
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Mouse Movement Question

    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

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

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

  3. #3
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Can you show me the scripts?

    Put them in [SCAR] tags.

  5. #5
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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...?)


    Code:
    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.

  6. #6
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

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

  7. #7
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sure does. Thanks so much for your help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •