Results 1 to 12 of 12

Thread: Mouse ( Box Variation )

  1. #1
    Join Date
    Oct 2011
    Location
    Vegas :D
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Mouse ( Box Variation )

    Simba Code:
    (*
    Mouse
    ~~~~~~

    .. code-block:: pascal

        procedure Mouse(Box : TBox; ClickType : Integer);

    Moves the mouse to the Indicated Box, and performs the ClickType

    .. note::

        by PhaseCode

    Example:
        Mouse(InvBox(1),1);
    .. code-block:: pascal

    *)

    procedure Mouse(Box : TBox; ClickType : Integer);
    begin
      MouseBox(Box.X1,Box.Y1,Box.X2,Box.Y2, ClickType)
    end;

    When working with InvBox's, I found it a pain in the butt to have to do X1,Y1,X2,Y2. Unless there is a method that Already does this, here is my suggestions : P .

  2. #2
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Damn should of added this long time ago...

    Name will be different though, like MouseBoxEx or something.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  3. #3
    Join Date
    Oct 2011
    Location
    Vegas :D
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    Damn should of added this long time ago...

    Name will be different though, like MouseBoxEx or something.
    : O You mean, one of my things will be in the repo?

  4. #4
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Yes, I use TBox's all the time now. As do many others, I think its worth the extra 3 lines.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  5. #5
    Join Date
    Oct 2011
    Location
    Vegas :D
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    Yes, I use TBox's all the time now. As do many others, I think its worth the extra 3 lines.
    Awwwww yea > , More to Come :P Thanks Narcle. It feels good contributing back to the community <3

  6. #6
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Smile What is a TBox ?

    Quote Originally Posted by Narcle View Post
    Yes, I use TBox's all the time now. As do many others, I think its worth the extra 3 lines.
    You have piqued my interest here. What is a TBox, and how / why / when would you use one / them ? Thx!
    Ciao
    NM

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    In lape we could have this with overload;



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  8. #8
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by NickMystre View Post
    You have piqued my interest here. What is a TBox, and how / why / when would you use one / them ? Thx!

    A TBox is a type that holds 4 integers which are basically the x and y coordinates of the opposite corners of a box.

    Code:
      TBoxx = record
        X1, Y1, X2, Y2 : integer;
      end;
    X1 and Y1 are the coords of one corner.
    X2 and Y2 are the coords of the other corner.

    Most inventory functions return the type for boundaries of inventory slots etc. and for convenience.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  9. #9
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    In lape we could have this with overload;
    Yeah would be sweet now heh.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  10. #10
    Join Date
    Nov 2011
    Location
    Jozi, South Africa
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Thumbs up

    Quote Originally Posted by Sex View Post
    A TBox is a type that holds 4 integers which are basically the x and y coordinates of the opposite corners of a box.

    Code:
      TBoxx = record
        X1, Y1, X2, Y2 : integer;
      end;
    X1 and Y1 are the coords of one corner.
    X2 and Y2 are the coords of the other corner.

    Most inventory functions return the type for boundaries of inventory slots etc. and for convenience.
    OK, much appreciated. I'll go look around now for some coding examples that I can 'dismember' and see how they work. Later!
    Ciao
    NM

  11. #11
    Join Date
    Oct 2011
    Location
    Vegas :D
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Narcle View Post
    Yeah would be sweet now heh.
    Overload would be nice : I I posted this but forgot it wouldn't compile because we don't have overload.

  12. #12
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Added MouseTBox to mouse.simba.

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
  •