SRL Archive - SRL Suggestions

Possible change to LoggedIn function?


trojan

2011-04-30 05:00:49

Does anyone else get the problem where they click the smart window and it goes blank for a few seconds so the script thinks your logged out and exits? If it's just me then fair enough but I changed my LoggedIn function to:

function LoggedIn: Boolean;
var
i :integer;
begin
//White text on Report Abuse Button
Result := (GetColor(472, 490) = 16777215);
if not Result then
i := 0;
Repeat
inc(i);
Wait(500 + Random (100))
Result := (GetColor(472, 490) = 16777215);
Until(i > 10) or (Result);
end;

NCDS

2011-04-30 07:40:58

From: trojan
Does anyone else get the problem where they click the smart window and it goes blank for a few seconds so the script thinks your logged out and exits? If it's just me then fair enough but I changed my LoggedIn function to:

function LoggedIn: Boolean;
var
i :integer;
begin
//White text on Report Abuse Button
Result := (GetColor(472, 490) = 16777215);
if not Result then
i := 0;
Repeat
inc(i);
Wait(500 + Random (100))
Result := (GetColor(472, 490) = 16777215);
Until(i > 10) or (Result);
end;


WaitFunc(@LoggedIn);
Just use that for your persoanl scripts, etc. LoggedIn is used to heavily to have anything added to it, really.

trojan

2011-04-30 08:21:17

Ahh okay, thanks mate