Results 1 to 6 of 6

Thread: FindBitmap Problem

  1. #1
    Join Date
    Jul 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindBitmap Problem

    My script says it finds a bitmap, but on the screen, there is none.

    Heres a picture of the website I'm using my script on:

    and my script:
    SCAR Code:
    program New;

    var
     D, P: integer; //P is also a variable

    procedure LoadBitmap;
    begin
     P := BitmapFromString(15, 19, 'z78DA33301805F4006E780125' +
           '7A474D1E3579D4E451934782C900DDC78E08');
     D := BitmapFromString(17, 19, 'z78DA3330A02670C3010C6800' +
           'E8630BA65DB40E014A6CA16E680C1E5B28B7CB8D44306ACB60B36' +
           '578A4315AE7176A9530F4292D0767C93FB0291000E322A29C');

    end;

    procedure FBitmap;
    var
     x, y :integer;
    begin
      if FindBitmapToleranceIn(P, x, y, 1, 1, 614, 328, 25) then
      begin
        WriteLn('Found the letter P');
      end else
        WriteLn('Color Not Found. :/ Sorry');
          if FindBitmapToleranceIn(D, x, y, 1, 1, 614, 328, 30) then
      begin
        WriteLn('Found the letter D');
      end else
        WriteLn('Color Not Found. :/ Sorry');
    end;

    Begin   // this is main loop
    LoadBitmap;
    FBitmap;
    end.

    Thanks in advance for all your help!

  2. #2
    Join Date
    Jul 2007
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    my guess is that you have bad pictures
    try using dtms... if you post a picture of the P and the D, i can make them for you.

    EDIT: here is the same thing but with A and S.


    SCAR Code:
    program New;

    var
     A, P: integer; //P is also a variable

    procedure LoadBitmap;
    begin
     P := DTMFromString('78DA634C66646008016224902101A161A28CF' +
           '140560001356940960F0135E940561811E6C410E11E026A00574F' +
           '076B');
     A := DTMFromString('78DA635CC5C8C0B0148891408604848689328' +
           '2D4CC21A0661990B58C809AF544A8D90864AD26A0660990B50ABF' +
           '1A000D770AF9');

    end;

    procedure FBitmap;
    var
     x, y :integer;
    begin
      begin
        if Finddtm(P, x, y, 1, 1, 700, 700) then
          begin
            WriteLn('Found the letter S')
          end else
            WriteLn('Letter S Not Found. :/ Sorry')
      end;
      begin
        if Finddtm(A, x, y, 1, 1, 700, 700) then
          begin
            WriteLn('Found the letter A')
          end else
            WriteLn('Letter A Not Found. :/ Sorry')
      end;
    end;

    Begin   // this is main loop
    LoadBitmap;
    FBitmap;
    end.
    Do not propose an idea of peculation without evidence of such action.

    http://cashcrate.com/704591 click here and make money!

  3. #3
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I decided to release mine for you to look at.
    Btw it could be that the letter you selected was pure black. Black is skipped by scar, so it only looks for the feathers.

    Here: http://www.villavu.com/forum/showthr...411#post184411

  4. #4
    Join Date
    Jul 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    omgwoot, thanks alot! I got it to work.
    The_Rs_Monkey, your script has an error:

    [Runtime Error] : Exception: Canvas does not allow drawing in line 247 in script chick.scar

  5. #5
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oops. Open up the debug image window (in scar, under view file menu)
    forgot to make the script do it.

  6. #6
    Join Date
    Jul 2007
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks, love the script The_rs_monkey.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. why is findcolor and findbitmap malfunctioning
    By lardmaster in forum OSR Help
    Replies: 7
    Last Post: 10-15-2006, 04:40 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
  •