Nu2Scar
2007-04-15 23:37:03
It knows what login screen you are on an acts accordingly. Also has a timeout feature case summut goes wrong. Nuttin special, but it took me hours to iron the damn bugs out. Almost smashed up the computer as a result. Check it out and tell me what you think. :sasmokin:
program AutoLogin;
{.include SRL/SRL.scar}
var
TimeOut, ScreenCheck : Integer;
const
Username= ('Username'); //Enter username & pass here blah blah obvious
Pass= ('Password');
procedure Login1;
Begin
ScreenCheck:=0;
TimeOut:=0;
Repeat
if (findcolor(x,y,16777215,417,284,503,297)) then
begin
writeln('First login screen found');
ScreenCheck:=1;
end else
TimeOut:=(timeout+1);
wait (1000);
until (ScreenCheck = 1) OR (TimeOut = 2)
if (ScreenCheck = 1) then
Begin
wait (500+random(1000))
mouse(460,292,40,10,true);
end;
end;
Procedure Login2;
Begin
ScreenCheck:=0;
TimeOut:=0;
Repeat
if (findcolor(x,y,65535,434,212,498,231)) then
begin
writeln('Second login screen found');
ScreenCheck:=1;
end else
TimeOut:=(TimeOut+1);
wait (1000);
Until (ScreenCheck = 1) OR (TimeOut = 5)
if (ScreenCheck=1) then
Begin
wait (500+random(1000));
Typesend(username);
wait (500+random(1000));
Typesend(pass);
wait (500+random(1000));
mouse(303,322,40,10,true);
wait (500+random(1000));
end else
Writeln ('Operation Timed Out');
TerminateScript;
End;
Procedure Login3;
Begin
ScreenCheck:=0;
TimeOut:=0;
Repeat
if (findcolor(x,y,0,610,316,650,356)) then
Begin
writeln('Final login screen found');
ScreenCheck:=1
end else
TimeOut:=(TimeOut+1);
Wait (1000);
Until (ScreenCheck=1) OR (TimeOut = 5)
if (ScreenCheck=1) then
Begin
wait (500+random(500))
mouse (400,340,50,30,true)
Writeln ('Grats '+ (username)+ ' you logged in successfully thanks to Nu2Scar!')
end else
Writeln ('Operation Timed Out');
TerminateScript;
end;
//[-----MAIN LOOP------]
begin
SetupSRL;
ActivateClient;
Login1;
Login2;
Login3;
end.