Results 1 to 3 of 3

Thread: Mouse Not working in particular region...[RUNIQUE]

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default Mouse Not working in particular region...[RUNIQUE]

    FIXED

    issue
    Okay so the mouse will for whatever reason not click on the chat region of the client.(Runique)




    Simba Code:
    procedure Mouse(T:TPoint;fuckyou:string)overload;
    begin
      moveMouse(T);
      wait(100);
      clickMouse(T.X, T.Y, 1);
    end;

    function teleportTo(place:TLOCATION):boolean;
    begin
      wait(50);
      mouse(Point(504, 512), '');
      wait(500);
      case place of
        SWBANK : sendKeys('MS', 100, 100);
        DUNGEON: sendKeys('DB', 100, 100);
      end;
    end;


    I have no idea why it refuses to click inside that red square, all it does it move the mouse there and type 'MS' (I am aware it does not press enter yet I want to resolve this clicking issue first..)



    If anyone would like to test it yourself, here is the code you don't need to download anything other than the RSPS (runique)

    Simba Code:
    {$I srl-6/srl.simba}

    const

      USERNAME = '';
      CLIENTNAME = 'Runique';
      CLIENTWIDTH = 765;
      CLIENTHEIGHT = 525;

    type
      TLOCATION = (SWBANK, NEWSPOT, DUNGEON, LOST);

    var
      rsClient:TSysProc;

    procedure Mouse(T:TPoint;fuckyou:string)overload;
    begin
      moveMouse(T);
      wait(100);
      clickMouse(T.X, T.Y, 1);
    end;

    function findBank():boolean;
    begin
    end;

    function teleportTo(place:TLOCATION):boolean;
    begin
      wait(50);
      mouse(Point(504, 512), '');
      wait(500);
      case place of
        SWBANK : sendKeys('MS', 100, 100);
        DUNGEON: sendKeys('DB', 100, 100);
      end;
    end;

    function string.contains(s:string):boolean;
    var
      i:integer;
    begin
      for i := 1 to length(self) do
        if (Pos(s[i], self) > 0) then
          exit(true);
    end;

    function activateRsClient(firstTime:boolean):boolean;
    var
      processes: TSysProcArr;
      i: integer;
    begin
      result := false;
      processes := GetProcesses();
      if (firstTime) then
        writeln('Scanning for ' , CLIENTNAME , 'Client..');
      for i := 0 to high(processes) do
        if (processes[i].title.contains(CLIENTNAME)) and (processes[i].width = CLIENTWIDTH) and (processes[i].height = CLIENTHEIGHT) then
        begin
          if (firstTime) then
          begin
            writeln('Found client');
            writeln('Target set to: ' , toStr(processes[i]));
          end;
          rsClient := processes[i];
          setTarget(processes[i]);
          ActivateClient();
          exit(true);
        end;
    end;

    function getClientName():string;
    begin
      activateRsClient(false);
      result := rsClient.title;
    end;

    function isLoggedIn():boolean; override;
    begin
      if (USERNAME = '') then
      begin
        writeln('Please enter a username at the top of the script');
        terminateScript();
      end else
        result := getClientName().contains(USERNAME);
    end;

    begin
      activateRsClient(true);
      Mouse(Point(334, 216), ''); // clicks the main screen...
      teleportTo(SWBANK); // does not click the chat region..
    end.


    solution


    I suspect it was something to do with SRL-6 as I was using the SRL-6 mouse function and they wouldn't work until I had to create my own slightly different. Then mine wouldn't work so I just rewrote the damn thing

    Simba Code:
    procedure Mouse(T:TPoint;fuckyou:string)overload;
    begin
      moveMouse(T);
      wait(100);
      holdMouse(t.x, t.y, 1);
      wait(50);
      releaseMouse(t.x, t.y, 1);
      wait(10);
    end;


  2. #2
    Join Date
    Sep 2014
    Location
    C:\Simba\
    Posts
    565
    Mentioned
    9 Post(s)
    Quoted
    71 Post(s)

    Default

    Have you tried overriding clickMouse so that it holds down the mouse for a couple of tens of millisecs?
    Feel free to ask me any questions, I will do my best to answer them!

    Previously known as YouPee.

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Joopi View Post
    Have you tried overriding clickMouse so that it holds down the mouse for a couple of tens of millisecs?
    Yeah it's what I ended up doing.

    FFS I forgot about ovverriding lol only reason I had that extra param

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
  •