Results 1 to 8 of 8

Thread: Find bitmap and click it *doesn't work*

  1. #1
    Join Date
    Jun 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Find bitmap and click it *doesn't work*

    Hi!

    Do you can help me? I have a big problem. I tried to find a bitmap in the window and click it. But it doesn't work. I'll show my bitmap. Hope you can help.

    P.S: The bitmap is now .jpg because it was to big as bitmap.

  2. #2
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try targeting the window with the crosshair, if not try this:

    SCAR Code:
    program Test;

    var
      bmp, xx, yy: Integer;

    begin
      bmp := BitmapFromString(0, 0, ''); // Insert your bmp here.
      if (FindBitmap(bmp, xx, yy)) then
      begin
        MoveMouseSpline(xx, yy, 2, 2);
        GetMousePos(xx, yy);
        ClickMouseSpline(xx, yy, 2, 2, True);
        Writeln('Bitmap found.');
      end
      else begin
        Writeln('Bitmap not found.');
      end;
    end.

  3. #3
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    285
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Maybe have a smaller bitmap of just a unique part of the thing you want to find? And be sure to save the bitmap has 32-bit.
    Huehuehuehuehue

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

    Default

    Quote Originally Posted by NinjaTerrorist View Post
    Try targeting the window with the crosshair, if not try this:

    SCAR Code:
    program Test;

    var
      bmp, xx, yy: Integer;

    begin
      bmp := BitmapFromString(0, 0, ''); // Insert your bmp here.
      if (FindBitmap(bmp, xx, yy)) then
      begin
        MoveMouseSpline(xx, yy, 2, 2);
        GetMousePos(xx, yy);
        ClickMouseSpline(xx, yy, 2, 2, True);
        Writeln('Bitmap found.');
      end
      else begin
        Writeln('Bitmap not found.');
      end;
    end.

    Hm, doesn't work. I tried in the program, bitmap not found. Then I opened the bitmap crosshaired that window, and, bitmap not found.

  5. #5
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try this:
    SCAR Code:
    program New;
    {.Include SRL/SRL.scar}
    var
    Bitmap,toler : integer;

    procedure LoadBitmaps;
    begin
    Bitmap:=//insert bitmap here
    end;

    procedure FindBitmaps;
    begin
    repeat
    if FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
      Mouse(x,y,2,2,true)
      WriteLn('Found Bitmap.')
    if not FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
      WriteLn('Didn'#39't find Bitmap adding tol.')
      toler:= toler + 5;
    until(FindBitmapToleranceIn(Btimap[1], x, y, 0, 0, 1023, 767, toler))
    end;

    begin
    SetUpSrl;
    toler:= 5;
    LoadBitmaps;
    FindBitmaps;
    end.

    Just put in the bitmap... Should work...Hopefully

    ~Stupedspam

  6. #6
    Join Date
    Jun 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks. It seems to work but it doesn't click and in the box come:


    Code:
    SRL Compiled in 109msec.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    Found Bitmap.
    Didn't find Bitmap adding tol.
    ...


    But thanks

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

    Default

    stupedspam left out some begin's and end's in his if's.
    SCAR Code:
    program New;
    {.Include SRL/SRL.scar}
    var
    Bitmap,toler : integer;
     
    procedure LoadBitmaps;
    begin
    Bitmap:=//insert bitmap here
    end;
     
    procedure FindBitmaps;
    begin
    repeat
      if FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
      begin
        Mouse(x,y,2,2,true)
        WriteLn('Found Bitmap.')
      end;
      if not FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
      begin
        WriteLn('Didn'#39't find Bitmap adding tol.')
        toler:= toler + 5;
      end;
    until(FindBitmapToleranceIn(Btimap[1], x, y, 0, 0, 1023, 767, toler))
    end;
     
    begin
    SetUpSrl;
    toler:= 5;
    LoadBitmaps;
    FindBitmaps;
    end.

    and you need to instert the bitmap where it says "insert bitmap here" and make sure your draggin the crosshairs to the window.

  8. #8
    Join Date
    Jun 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It works!

    Thank you all very much.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How can I click a few inches above a bitmap
    By newguy45 in forum OSR Help
    Replies: 8
    Last Post: 12-17-2008, 09:20 PM
  2. Help. Wont Click bitmap?
    By 0wn 4 skill in forum OSR Help
    Replies: 8
    Last Post: 07-05-2008, 12:51 PM
  3. Find Bitmap in Bitmap file
    By fORCE_wORKS in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 12-13-2007, 11:04 PM
  4. Find a Chest & Left Click,Right Click
    By yanix in forum OSR Help
    Replies: 3
    Last Post: 10-03-2007, 06: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
  •