Results 1 to 16 of 16

Thread: Trouble finding bitmaps...

  1. #1
    Join Date
    Aug 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Trouble finding bitmaps...

    I can't seem to find bitmaps. I tried changing the bitmaps to something else just to get it to work but it never detects it heres the code:
    Code:
    program New;
    
    procedure searchBTMP;
    var
    firefox, i, x, y : integer;
    tryNumber : String;
    begin
      firefox := BitmapFromString(13, 12, 'beNpjYFhnwrNYjuWpD+' +
           'P3cMbVaebxu28DUdmtHwWXP2Vf+Jhy7mPMiY8MDAzX0uRP57r9vzz' +
           'l8pKqgOzuoI2PgSjx6IeYA++CNj/1WHzHdeVzoLLXTXrvp/jUljYo' +
           '+LVplWwK2vISiAK3vvLb/Npx9k394k265TuAyr72Gr3oNBcLnGgy/' +
           'ZbziidOSx8Bkf38u8b1ew3r96llLJOLnAlUdrDC7kmPtXL0ZN3uC8' +
           'YTL5tMAqPJVzSLNsmHTJYJniTl3wdUxm1RJe9YIhMyQbnqgHr9UY1' +
           'GCDqmWrFHNn6hZOAEMfc24pXJZawRTNsuk7lBoXCnXNEeicIDQCSS' +
           'f0CqYK9iyV7J0BnCdrVAZXMK/JSSl/IkbedL2SGftiYwrxuIMus67' +
           'EsWCsetEXZpFbQoBwVIufjJUr22rKjmzJg9+cbPa2WB6Mt0gx9H4k' +
           'o6OjmdJ/AaFgCV7XEVuJst/rZC9E2l6LMS0YeZAkB0Kpy/L84hJLa' +
           'Aw76bUyuDgUgAAEzVt6o=');
    for i:=0 to 9 do
    begin
      tryNumber := intToStr(i+1);
      Writeln('Looking for Play Bitmap.....Try '+ tryNumber +' out of 10');
      if(FindBitmap(firefox, x, y)) then
      begin
        Writeln('Found Firefox');
        break;
      end else
      begin
        Writeln('Firefox not found');
        wait(1500);
      end;
    end;
    end;
    
    begin
    searchBTMP;
    end.
    I shouldn't need tolerance right? because the desktop stays the same....

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try tolerance
    SCAR Code:
    If (FindBitmapTolerance(firefox, x, y, 50)) Then

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

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

    Default

    Use
    SCAR Code:
    FindBitmapToleranceIn
    If the window is quite large, or the bitmap is always in one place to reduce lag.
    <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.

  4. #4
    Join Date
    Aug 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tried tolerance of 50, 60, 90....none work. Its not just on desktop, i tried it on runescape or any other window, the function just doesnt work......

  5. #5
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What are you trying to do?

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  6. #6
    Join Date
    Aug 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    searching for a bitmap

  7. #7
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh your the clever one.

    Have an attitude like that and no1 will want to help you.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  8. #8
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Make sure you drag the cross hairs over the entire screen you wish to search, also try making a smaller bitmap, it might work.

    @ Rogeruk - I don't see any attitude problems

  9. #9
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smarter Child View Post
    Make sure you drag the cross hairs over the entire screen you wish to search, also try making a smaller bitmap, it might work.

    @ Rogeruk - I don't see any attitude problems
    searching for a bitmap
    We know that much. What are you trying to do with the script?

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  10. #10
    Join Date
    Aug 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rogeruk View Post
    We know that much. What are you trying to do with the script?
    Click firefox on my desktop. I know its useless, but the reason why i am doing it is because i want to learn how to search for a bitmap (which is what i said earlier). I am new to programming in scar thats why.. didnt mean to offend you bro, thanks for your help and everyone.

  11. #11
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im not sure how your going to select your desktop. Your best bet of learning is to search for a bitmap on a website.

    For instance
    http://en.wikipedia.org/wiki/Randomness

    Try searching for the

    Make sure you target the window tho.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  12. #12
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use like logs in the runescape inventory, they're easy to find.

  13. #13
    Join Date
    May 2008
    Location
    Canada
    Posts
    665
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    I guess he has the same problem as me... works on RS, and I can run other's script with working bitmaps. I can make bitmaps for RS but it doesn't seem to work for other things.

  14. #14
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That bitmap is to big and you don't free out your bitmaps.Mega lag.Get a certain part of Firefox but i doubt you can capture the desktop as your client

    Put FreeBitmap(bmpname); Before you use it for something like before a mouse or click or something. This releases the bitmap reducing lag.

    Edit: I made a script that opened up the runescape window, ill try to find it.

    Edit2: found it

    SCAR Code:
    program Openit;
    {.include srl/srl.scar}

    const
    owb= 'www.google.com'; //web page


    Procedure Open;
    begin
    OpenWebPage(owb);
    Writeln('now opening The Webpage');
    end;

    begin
    ActivateClient;
    ClearDebug;
    SetUpSRL;
    Open;
    end.
    Last edited by Mr. Doctor; 09-03-2009 at 03:31 AM.

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

    Default

    SetDesktopAsClient;

  16. #16
    Join Date
    May 2008
    Location
    Oregon, USA
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It can vary and it doesn't always turn out perfect, i usually need some tolerance for it to always work, try it with a fair amount of tolerance then if that doesn't work try with more or make a new one.

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
  •