Results 1 to 12 of 12

Thread: RSReady to handle (invalid) resizeable client.

  1. #1
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default RSReady to handle (invalid) resizeable client.

    Simba Code:
    function RSReady: Boolean;
    var
      t: Integer;
    begin
      t := GetSystemTime + 5000;
      while (not (Result)) and (t > GetSystemTime) do
      begin
        Result := (CountColor(0, MSCx - 20, MSCy - 20, MSCx + 20, MSCy + 20) < 20);
        Wait(3);
      end;
      if (not (Result)) then
        Exit;
      Result := (LoggedIn) or (LobbyScreen) or (GetColor(745, 17) = 12312554); //X button in top right
      if (GetColor(748,66) = 12312554) then // X button on resizeable client
      begin
        WriteLn('You are using the "Resizeable" screen option in RS.');
        WriteLn('Please set it to "Fixed" to have SRL function properly.');
        TerminateScript;
      end;
    end;

    That color is constant on the resizeable client with the default SMART setup (the button changes location based on screen size). It probably wouldn't work if the user's browser was set at resizeable, but it will detect it fine if they are using SMART. I tested numerous times and appears to remain the same.

    I thought of having it call something like SetAutoingDefaults but that doesn't work, and it's best for the user to understand what they did wrong.

    Without this fix, SRL will hang for 3 minutes and then say an obscure error message about being "not ready". This should fix the issue for 99% of resizeable users.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Bump for this, it's really confusing to newbies who do it wrong and then SRL does nothing when RS begins because of the graphics settings.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Support!



    ~Home

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    I 100% agree, there are countless threads posted about this 'problem' and this will probably help a lot of them! Great idea!

  5. #5
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Support

  6. #6
    Join Date
    Nov 2007
    Posts
    326
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I support this

    Check out my Edgeville Smelter!

  7. #7
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Please someone commit this already :P I hate to have to manually set fixed for all my bots.
    Ce ne sont que des gueux


  8. #8
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Floor66 View Post
    Please someone commit this already :P I hate to have to manually set fixed for all my bots.
    You still have to do that with this fix

  9. #9
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Yeah but see, the script will terminate itself the way it is now because it won't detect RS as loaded. Now I can make a simple function to set it to fixed once RS has loaded.
    Last edited by Floor66; 03-10-2011 at 01:00 PM.
    Ce ne sont que des gueux


  10. #10
    Join Date
    Jun 2009
    Posts
    177
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wait, why not just check if the handle has the proper size?

    http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

    Code:
    RECT wind_rect;
    int width;
    int height;
    GetWindowRect(hWnd, &wind_rect);
    width = wind_rect.bottom - wind_rect.x;
    height = wind_rect.top - wind_rect.y;
    if (width != 765 || height != 503) {
        //Invalid size; handle this here
        //???
        //PROFIT
    }

  11. #11
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    The size of the resizeable client is the same as the fixed. Problem is, it conforms differently if you choose fixed or resizeable. Using that code wouldn't work LolL. Thanks for the idea though.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  12. #12
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

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
  •