Results 1 to 5 of 5

Thread: Is there a SRL function or procedure for chat tabs?

  1. #1
    Join Date
    Nov 2014
    Posts
    56
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default Is there a SRL function or procedure for chat tabs?

    Say I am in private chat tab. I want to select general chat tab. Then scroll up a few times. Then scroll down a few times and select back the private chat tab.

    Is there a SRL function / procedure for selecting those chattabs or do I need to create my own tbox / mousebox?

    The 2nd question relates to the mouse scroll function

    I think the syntax is mousescroll (pnt, integer, boolean). Must it be only a single point? How do i random get my mouse into the general vicinity of the chatbox?

  2. #2
    Join Date
    Apr 2012
    Posts
    157
    Mentioned
    10 Post(s)
    Quoted
    57 Post(s)

    Default

    I'm not sure on the general chat tab, as I am at work. But for the general vicinity of the chatbox, you could probably do something like mouseBox(chatBox.getBounds, MOUSE_MOVE);

    That should move your mouse 'somewhere' within the chatbox.

    Then once you are there, you can get the mouse position, using the function which I forget the syntax to...which will give you a tPoint, to pass into mouseScroll.

  3. #3
    Join Date
    Nov 2014
    Posts
    56
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by serajin View Post
    I'm not sure on the general chat tab, as I am at work. But for the general vicinity of the chatbox, you could probably do something like mouseBox(chatBox.getBounds, MOUSE_MOVE);

    That should move your mouse 'somewhere' within the chatbox.

    Then once you are there, you can get the mouse position, using the function which I forget the syntax to...which will give you a tPoint, to pass into mouseScroll.
    I see. Thank you. I am very interested in that syntax which will get me my mouse position as a Tpoint.

  4. #4
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Brose View Post
    I see. Thank you. I am very interested in that syntax which will get me my mouse position as a Tpoint.
    This might be what you're looking for

    Simba Code:
    function getMousePos2():TPoint; //returns the mouse position as a TPoint
    var
      x, y:integer;
    begin
      getMousePos(x, y);
      writeLn('Mouse position: {X = ' + toStr(x) + ', Y = ' + toStr(y) + '}' );
      result := point(x, y);
    end;
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  5. #5
    Join Date
    Oct 2013
    Location
    East Coast USA
    Posts
    770
    Mentioned
    61 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by Brose View Post
    I see. Thank you. I am very interested in that syntax which will get me my mouse position as a Tpoint.
    You can use GetMousePos(x,y) to get the mouse position. x and y are 'var' so when you pass them in they will change to the current mouse position.

    This function is part of the base simba program. Although the docs are wierd most of the info is in there

    You can find it if you clear the script box in simba and enter "mouse" into the box under the function list.

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
  •