Показать сообщение отдельно
  #10  
Старый 25.04.2015, 02:11
AlexBerg001 AlexBerg001 вне форума
Прохожий
 
Регистрация: 13.04.2015
Сообщения: 24
Версия Delphi: Delphi 2010
Репутация: 10
По умолчанию

Ну или вот второй вариант без критической секции
Код:
procedure TMyThread.Execute;
  var
  HTML: string;
  Acc: integer;
  IdHTTP: TIdHTTP;
  IdSSL: TIdSSLIOHandlerSocketOpenSSL;
begin;
 IdHTTP := TIdHTTP.Create;
 IdSSL := TIdSSLIOHandlerSocketOpenSSL.Create;
 IdHTTP.HandleRedirects:=true;
 IdHTTP.IOHandler:=IdSSL;
for Acc := 0 to Accounts.Count-1 do
 begin
 if Terminated
 then break;
 ProgressPos:=Acc;
 Synchronize(ProgressBar);
 Login:=copy(Accounts[Acc], 1, pos(del, Accounts[Acc])-1);
 Password:=copy(Accounts[Acc], pos(del, Accounts[Acc])+1, MaxInt);
 HTML:=IdHTTP.Get('http://xxxxxx'+Login+'xxxxxx'+Password);
  if pos ('xxxxxx', HTML)<>0 then
  if Form2.sEdit3.Text<>'' then
  begin
   HTML:=IdHTTP.Get('https://xxxxxx'+Form2.sEdit3.Text+'xxxxxx');
  if pos ('xxxxxx', HTML)<>0 then
    begin
     Synchronize(Bad);
    end
    else
    begin
     Synchronize(Good);
    end
  end
  else
  begin
     Synchronize(Good);
  end
else
begin
Synchronize(Bad);
end;
Synchronize(WriteFile);
end;
IdHTTP.Free;
IdSSL.Free;
end;
Ну тут, вообще очень быстро, зато миллион одинаковых строк)))
Ответить с цитированием