Results 1 to 7 of 7

Thread: Can't get bitmap to work for some reason

  1. #1
    Join Date
    Jun 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Red face Can't get bitmap to work for some reason

    I first tried using a Rocktail in game, then I dumbed down to try and find some text from the Simba coding workplace, both to no avail.
    Here's the second bitmap I tried to find, unsuccessfully:
    Simba Code:
    program new;
    {$i MyCode.simba}
    var
      Image, x, y: Integer;
    begin
      SetupSRL;
      ActivateClient;
      GetClientDimensions(w, h);

      Image := BitmapFromString(112, 28, 'meJztmH1MW9cZxiNNmTZpVVG2I' +
            'oWUOmGd84HTqTMtI2Ms3Uda6sBIxOIlTqImENK6gwiWwdrBuAE6UG' +
            'rBQjEOGpnSupTGmtfVKWzDo1DclGQMFOJ2CNNsY16jWAo0smY6EOS' +
            '3e2zPJo4ToOmUafKj84d17znnPvfx+7zvey78r8BoNKr8kH/caS7/' +
            'D/B4PE4/5B93mksMMcQQQwwxxBDDTeGdpnecFit1EhaJ0Z47Q2Max' +
            'sHaQ6MBl50p9xLWuqewuzA0IkkYG/AMwMTt8vF4MfZS34K1kUkXTC' +
            '16oY/mQTKLWZ2Adjk26XaZfDz4YBDKjGg209fA1eElrB2+iqGPhzX' +
            'ExaNS4DSB63b5jHnIaeaBTLY9yPCrTC/6/52ZE5KeOIO2gryEO6bn' +
            'nF9StwfXCN7LzPqWsNY3y0UvbS40+k9Mz49mhKSHTrBBh/kw4923m' +
            'iy7YcBDg1EYxFCD/TimUxSYKFCE9Zw/JzBaJHqNeJd4lJlvxtBoqG' +
            'PAwsRocM6Qm+N2agxRboWWy0+31FFnwdxOv4X+v2LuDJJ3D+EFB+g' +
            'k1it420TnKaTjSDXUS5GG7RlFsiDVhcmY6xm24puMQl6yoSjAVIDL' +
            'dtMXlP/5Mx6qT5OWxvokvq6mMpuS0nB8zl7jwxneukTNG2RkoFKiU' +
            'onxnSQOp9F/mslLcljDtQWUDIRchwt9q3hWaJ9VSSi/xAvbGXktON' +
            'M6TG4DKZuJV6BYjUkb5i97+WgvyY+gjiPrC6ifYLuOci0GC98v5YG' +
            'NPPll7Mfw+nDMCT3XJPDLCkpLUWWjUpOqZHcafa1MjgQ5y1lRVYJq' +
            'k2CSrGKtimw19TtxD0YxxWL0lNNUsVG8YKuet9s4e55WB9sOhfOnL' +
            'ObpS+yrFWK+UYOzA6dTjKNtbNGjTcNaCwFJb4lASixqFM86XR3ep6' +
            'qNbxbxnIaBk8GZkz7GLvPeCPomFFpMeWH+spcvXKboVdQa1InYnqe' +
            '0mo17hKQvNHHkdSGpoQDvIA6f0PPu5TyaQNMhnA6c52npYG+1kNRa' +
            'HeQsFxrn33H+WTAZctLl5GAtX9tKz7EoSXsxejYM8EQJ+ZsYtogyK' +
            'hOWY6DiZdI17IkTen7gpbKPr+iIj0OvQSoM+iI7n8R0Ej9HfT5cWL' +
            'jkTfln5dcTvw59Tnif8gp+doQuk/DpYvjLfCQHW3XsUPJ+B9JJ7t1' +
            'PbS6/asfkRKFC0uF14PAKPVfFUaVh6GW4CrOcn+BoFykZPPcUV/uY' +
            '9TI6gWWAugY/E4liidRslA/SUc5EfySflnfY9FNyv8Uvfsh4L9PeK' +
            'K+528SBA5h3c+Vi+KLNFc6fF6+w24zyMeI/w9r7gyadP4xl/shbqG' +
            'TM+COi1ooqF1WK8PKyu1n2KTQbaPsBF9+JkrJuoWeBDknFB87wnE5' +
            'bFD0j6pEsatdfWLsf/QFGW7l8iZNnyapCnSLyT8Dvn1+Fcg0dz0TR' +
            '0/IumnrWJVOcyWAzvmi1Y5F6PvoY+vvpfi1o0vnD4/aLObeAntcCk' +
            'k7iHMP5nvDysi1C0rjP8vB9GL4rqsB/W89Zf7FLfpa9BfzuCO2D7J' +
            'KEmLYqkX8CftdVoXyEDimKnnW/Z10R0i7OnBBizkVLcZV/YMdTHMz' +
            'gb12iis/6/8Sf20nPY889Yb/L/spR8GZTuNSGnNJj9Tff00HC8vLO' +
            'IQyt2Fuvs3Agk3R3BruCUGHdWcg3cji0ju76T17PpHtoy8NtD3Nue' +
            'ZPUHMr1/LGd5/vQ5gfzhvzuH07z+jg55Tf1+2Lyp1xr5BQdqhHnnT' +
            'icPFkvcmPmXbToRSxZXeyrJkVNVRYdTcGwbOrg8Uq+mCTyf8jvgXN' +
            'NYSsrN1G2if7W8IOuTGMep6QwMs7lGpFfzbNp9DYGZ8qbTHzE6JiI' +
            '4YRcKnLpasLtEvnKNx2sR7kaipRc+C2lL5GQR4UW80mOObhvvUjy5' +
            '17kxXOi/1x5F2Xp2OrDnHdUoUvBKuF5n+az6PXo1XTbxN2+P1H5G1' +
            'J3okikOZ93fx0ZhIvRUy7ftpFwD6OWGwYV39OS+TSJ8aTG86PHcXb' +
            'z1ghVNiGpUhFMmwqlELNgo+hPQn5fUM9thZF5WO5h9qZxrhXvf1wp' +
            '73BqjC05IscuX0HCCjIU/FiDu4/h8WC/tCKO5DiObmX7PpZrSViNb' +
            'hcVtSTcK+rmhjWs2SDORyvjKXuavdow54dS6Kpi8iwz/8LzT35iJj' +
            '6LtWpxN/2rPHOQb2/n0yoh6eGsyCS5GD25vseukTgu0W7GYqfOEG6' +
            'AJ6Yi+/lQ8z/f1Av6Xe665+8gjxt77BvPDqE57okw1cDT5X4+kDfM' +
            'Zux2DIbrGRrERflW6ErEiX5+P2+ow+4/IASaf2tLZBGX9UzS80oZ/' +
            '7jl+SiGBRE4b5ac4KH9dDcv7XtCDDci8D1kcybFqaK1W9L3hBhuRO' +
            'B7XUvLx/lkEUMMMcQQw2LwbzRNgFg=');

      if FindBitmapToleranceIn(Image, x, y, 0, 0, w - 1, h - 1, 100) then
        Writeln('Success')
      else
        Writeln('Failure');
      FreeBitmap(Image);
    end.
    I dragged the crosshairs to the coding window and made sure the bitmap part was visible... There must be something I'm not getting. The resolution of the image too poor or something? I'm saving as 24-bitmap as the guide says.
    Last edited by ragebugger; 06-28-2012 at 09:15 PM. Reason: Messed up

  2. #2
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    It can't find the bitmap because if that's the entire piece of code, It won't be able to find the SMART text because you didn't include smart...

  3. #3
    Join Date
    Jun 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Sorry, I messed some things up on that post, still doesn't work though
    If you're just beginning to learn srl too, add me on AIM (kingluffymonkey) and we can help each other out and revel in our ignorance

  4. #4
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    What's MyCode.Simba...? and you can't SetupSRL without having SRL included..

  5. #5
    Join Date
    Jun 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    MyCode.simba has {$i SRL\SRL.simba} at the top, and has some procedures/functions I made
    If you're just beginning to learn srl too, add me on AIM (kingluffymonkey) and we can help each other out and revel in our ignorance

  6. #6
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Ok and...

    GetClientDimensions(w, h);

    you need to define w and h as integers.


  7. #7
    Join Date
    Jun 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah that's defined in MyCode hm

    It compiles fine just always prints Failure

    I'll try again

    Edit: Well, at least i got it to work finding a blank white background with tolerance 0

    I am going to reboot my comp and change resolution back to 100%

    Edit2: That seems to have fixed it. I notice the color picker tool does not work perfectly either when my screen is not at 100% resolution. The only problem is, this is killing my eyes :P

    Edit3: Actually it's not the resolution exactly... I'm using Windows 7 and it's that thing that changes the font size to Largest display 150% under right click Properties -> Personalize -> Display -> Largest (150%)
    Last edited by ragebugger; 06-28-2012 at 10:23 PM.
    If you're just beginning to learn srl too, add me on AIM (kingluffymonkey) and we can help each other out and revel in our ignorance

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
  •