Results 1 to 5 of 5

Thread: need help with DTMs

  1. #1
    Join Date
    May 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need help with DTMs

    Hi.

    I need to find a way to store the position of all the DTMs on the screen into a TPA , just like the FindColors function does with colors.

    thx for all the helpers :P

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindDTM(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;

    (Or something like that).. It'll store the x and y coords.

    (Use like, if(FindDTM(DTM, x, y, 0, 0, 100, 100))then Mouse(x, y, 2, 2, True); )

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

    Default

    Quote Originally Posted by ian. View Post
    FindDTM(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;

    (Or something like that).. It'll store the x and y coords.

    (Use like, if(FindDTM(DTM, x, y, 0, 0, 100, 100))then Mouse(x, y, 2, 2, True); )
    That will store where it finds one DTM, but I think he wants to store the coordinates of multiple DTMs.
    In which case, I don't think is possible. Would be interesting if someone knows how though.

  4. #4
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    If it's just one DTM, then do this:

    SCAR Code:
    program DTMToTPA;
    {.include SRL/SRL.scar}

    var
         I, X, Y, DTM : Integer;
         TPA : TPointArray;

    begin
         repeat
             if FindDTM(X, Y, DTM, X1, Y1, X2, Y2) then
             begin
                 TPA[0]:= X, Y;
                 Inc(I);
             end;
         until(not FindDTM(X, Y, DTM, X1, Y1, X2, Y2);
    end

    Richard
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    I posted a FindBitmaps somewhere a long time ago that could be converted to FindDTMs (or the other way around, I forgot) but I'm having trouble finding it. Though another solution is copying client to bitmap, and then doing a FastSetPixel to 'break' each found DTM so it will find the next one, but that might be too slow.

    Ah I found it. I couldn't find it at first because I was search for FindBitmaps and FindDTMs, but I forgot I called it FindAllBitmaps (this was from before SCAR had FindBitmaps). Here you go, just change all bitmap stuff to DTM http://www.villavu.com/forum/showthr...map#post108319
    Last edited by Boreas; 09-04-2009 at 04:13 AM.

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
  •