Results 1 to 6 of 6

Thread: Function that turns a TPoint into x and y integers

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

    Default Function that turns a TPoint into x and y integers

    Im looking for a function that does that, because AFAIK, I cant use a Tpoint in Mouse(x, y, rx, ry, button). Searching in the functionlist, I came up with nothing...
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  2. #2
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    870
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    You can access the x and y inside the point.

    Say your point is called myPoint, you can get the x inside it like this:
    Simba Code:
    myPoint.X

    So, for your mouse you could do this:
    Simba Code:
    Mouse(myPoint.X, myPoint.Y, rx, ry, button)
    My scripts:
    Advanced Barb Agility Course(outdated), MonkeyThieverV0.11, MahoganyTableV0.4(outdated)
    Questions? I bet that for 98% of those, you'll find answer HERE

  3. #3
    Join Date
    Jun 2012
    Posts
    219
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Tpoint.x,TPoint.y

    There ya go

  4. #4
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys! Forgot I could do that!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  5. #5
    Join Date
    Jan 2012
    Posts
    190
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    yeh u can use tpoint in mouse lol haha yeah juss gotta declare ....

    SCAR Code:
    point=point.x and point.y

  6. #6
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    If you want a procedure that means you can store the values if you wish to use them at a later point:

    Simba Code:
    procedure TPointToXY(TP: TPoint; var x,y: integer);
    begin
      x := TP.x;
      y := TP.y;
    end;

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
  •