Results 1 to 4 of 4

Thread: Mmouse Function Not Working

  1. #1
    Join Date
    May 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Mmouse Function Not Working

    Alright, I was trying to script an antilogout script utilizing the Mmouse function. It is not complete yet so what I have included is not yet finished.

    Problem: When the script is run, the mouse gets stuck in one location. What should happen is if the script detecs the mouse has been idle for a one second (for the sake of testing for immediate results), the mouse moves randomly to a location (to reactivate Runescape's timer). Again, the script has not been completed, that is not the problem; the problem is that the mouse will not move to it's random destination.

    SCAR Code:
    program Antilogout;

    {.include SRL/SRL.scar}

    var
    x,y,xchange,ychange,xmove,ymove,counter: Integer;

    procedure Antilogout;
              begin
              repeat
                   GetMousePos(x,y);
                   Wait(1000+random(100)); // Wait 1 Second Before Testing Mouse Location
                   GetMousePos(xchange,ychange);
                   if (x=xchange) then
                      begin
                      GetMousePos(x,y);
                      xmove:= random(200);
                      ymove:= random(200);
                           Mmouse(x+xmove,y+ymove,20,20);
                           counter:= counter + 1;
                           writeln('Script Successfully Executed '+IntToStr(counter)+' Times');
                           Wait(1000);
                      end;
              until(false)
              end;

    begin
    Antilogout;
    end.

    Any Help would be greatly appreciated
    Thanks!
    - Pianoman993

  2. #2
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, put "setupsrl" in the beginning of your mainloop, that solves the problem

    -Tsn.
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  3. #3
    Join Date
    May 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    dude! thanks! your my savior man

  4. #4
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    haha, i cant tell you how many times i had made that error... i would always get so frustrated until someone pointed out the blatantly obvious problem.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mouse function not working?
    By ttugamer in forum OSR Help
    Replies: 3
    Last Post: 02-01-2009, 09:43 PM
  2. Function not working...
    By stupedspam in forum OSR Help
    Replies: 2
    Last Post: 07-09-2007, 02:28 AM

Posting Permissions

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