Results 1 to 6 of 6

Thread: My finddeformedbitmaptolerancein is fail

  1. #1
    Join Date
    Mar 2007
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My finddeformedbitmaptolerancein is fail

    Code:
    program New;
    var
       w: integer;
       px,py,ang: integer;
       acc: extended;
       
    procedure LoadPics;
    begin
         w := BitmapFromString(23, 19, 'beNq9k9EKACAIA/3/ny7oIQhxnSP' +
           'ak7RxxNAxXimWhEVckeQWSWYXQuLU9ZM25NqtgHQf92xAcm9kKwQE' +
           'dqghlQshVT/VDuukAdEl/Idkl0O8U+qerSaYkAkNPTjy');
    end;
    
    begin
         LoadPics;
         writeln('Waiting 3 seconds..');
         sleep(3000);
         writeln('Searching..');
         if(FindDeformedBitmapToleranceIn(w, px, py, 21,156, 194, 235, 80, 0, True, acc)) then
         begin
              writeln('Found it at '+inttostr(px)+','+inttostr(py));
              writeln('Acc: '+inttostr(round(acc)));
              movemouse(px,py);
         end else
         begin
             writeln('No dice.');
         end;
    end.
    The thing is, it's finding the bitmap on a pure white screen... and obviously not working like I'd hoped.

    The bitmap is a black W on a white background. Tools -> String to Picture "beNq9k9EKACAIA/3/ny7oIQhxnSPak7RxxNAxXimWhEVckeQWSWYXQuLU9ZM25NqtgH Qf92xAcm9kKwQEdqghlQshVT/VDuukAdEl/Idkl0O8U+qerSaYkAkNPTjy" to see it.

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Why not use countcolor?

  3. #3
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Why not use countcolor?
    Why use count color ?

  4. #4
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    because the color is black, thus its constant making it simple to identify with countcolor?
    “Ignorance, the root and the stem of every evil.”

  5. #5
    Join Date
    Dec 2006
    Location
    Canada, BC
    Posts
    728
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    try useing a DTM, Tools > DTM Editor

    ive never actualy used bitmaps cause i learned to use DTM's first and i dont see much point in going back when DTM's can do everything bitmaps can do.
    Lance. Da. Pants.

  6. #6
    Join Date
    Mar 2007
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by lancerawks View Post
    try useing a DTM, Tools > DTM Editor

    ive never actualy used bitmaps cause i learned to use DTM's first and i dont see much point in going back when DTM's can do everything bitmaps can do.
    I would have done DTMs but I didn't see any function for searching for deformed DTMs

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
  •