Results 1 to 8 of 8

Thread: Exact center of screen

  1. #1
    Join Date
    Nov 2006
    Location
    Wisconsin
    Posts
    1,629
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Exact center of screen

    Does anyone know how to find the exact center of the screen in x, y coordinates for scar?

    Thanks for any help

    Mr.klean


    Quote Originally Posted by Rubix View Post
    Quote Originally Posted by Dan Cardin View Post
    you ought to listen to Mr. Klean...he's magical!
    this.

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

    Default

    well, you could try this:

    SCAR Code:
    function Midpoint(fx,fy,ex,ey : integer) : tpoint;
    begin
      result.x := Round((fx + ex) / 2);
      result.y := Round((fy + ey) / 2);
    end;

    function FindMiddle : tpoint;
    var
      x,y : integer;
    begin
      GetClientDimensions(x,y);
      result := Midpoint(0,0,x,y);
    end;

    What this does is gets the x,y coordinates of the client, and then finds the midpoint between 0,0 (the top left corner of client) and x,y (bottom right corner). And if you dont understand tpoints, just ask!

  3. #3
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    What are tpoints?

    feel free o PM me or something.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  4. #4
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    They are Global constants : MSCX and MSCY (Main Screen Centre X, and Main Screen Centre Y)
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

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

    Default

    Fakawi, he just wants mid point of the selected Screen.



    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)

  6. #6
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ill make a tut on TPoints for anyone who needs it, if there isnt already one...

    EDIT: Alright, tut is in Intermediate section, for anyone who wants it

  7. #7
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    r0b0t, u've played too much war games, (talking of ur sig) its m4a1 , not maverick m4a1. maverick comes for that steam didnt get the license for m4a1 carbine.

  8. #8
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    You bumped a one month old topic with a spam message?
    Interested in C# and Electrical Engineering? This might interest you.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How To Read The Exact Text From A File?
    By Maninblack144 in forum OSR Help
    Replies: 5
    Last Post: 05-13-2008, 05:51 PM
  2. How to find exact pixel at co-ords
    By Sp0rky in forum OSR Help
    Replies: 4
    Last Post: 03-06-2007, 04:06 PM
  3. Trade Screen and Duel Screen?
    By Hey321 in forum OSR Help
    Replies: 18
    Last Post: 12-14-2006, 11:13 PM

Posting Permissions

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