SRL Archive - SRL Archives

GameTab.scar's FixGraphics


YoHoJo

2009-12-07 21:03:45

while (not FindTextTPA(2070753, 0, MSX1, MSY1, MSX2, MSY2, 'Graphics Options', UpChars, Nothing)) and (LoggedIn) do
begin
GameTab(tab_Options);
MouseBox(605, 258, 623, 277, 1);
Wait(500 + Random(200));
Inc(i);
if (i > 3) then
begin
srl_Warn('SetGraphics', 'Could not open Graphics Options screen', warn_Warning);
CloseWindow;
Exit;
end;
end;

if not (GetColor(219, 85) = SD_Color) then
begin
//Checks for the green arrow, clicks middle of box
Mouse(219, 85, 5, 5, True);
if not WaitColor(219, 85, SD_Color, 0, 2000) then
FixGraphics;
end;

The portion above "if not (GetColor(219, 85) = SD_Color) then" clicks the button to get into graphics screen 3 times or until the screen is detected being up. It then goes on to jack with the settings like it should. A longer wait, or a different detection method is needed because the graphics settings screen often loads slowly/in pieces. So maybe the 'Graphics Options' is see able, or the border of it is visible, but that doesn't necessarily mean all of the options are fully loaded yet.

This leads to either changing the window to fixed (which I THINK doesn't even matter, I don't think SRL can even login/move if you screen is set to anything but fixed window) and also leads to setting the brightness to max, even if its already at max.

A longer wait would allow the Graphics Option window to load completely, let SRL realize everything's set properly, and exit the window/start autoing faster.

Once again, small problem, not a big deal, but still something to be fixed.