моя очередная разработка unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, ExtCtrls, IdAntiFreezeBase, IdAntiFreeze, GruString; type TForm1 = class(TForm) Timer1: TTimer; Memo1: TMemo; IdHTTP1: TIdHTTP; Label1: TLabel; IdAntiFreeze1: TIdAntiFreeze; Memo2: TMemo; procedure Timer1Timer(Sender: TObject); procedure FormActivate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Timer1Timer(Sender: TObject); begin Label1.Caption := IntToStr(StrToInt(Label1.Caption) - 1); if Label1.Caption='0' then begin Application.ProcessMessages; Memo2.Lines.LoadFromFile('HTTPProxies.txt'); try Memo1.Text := IdHTTP1.Get('http://proxy-list.org/downloadproxylist.php?sp=-1&pp=any&pt=any&pc=any&ps=any'); except end; Memo2.Text := Memo2.Text + Memo1.Text; DeleteCopy(Memo2.Lines); Memo2.Lines.SaveToFile('HTTPProxies.txt'); Label1.Caption := '600'; end; end; procedure TForm1.FormActivate(Sender: TObject); begin Application.ProcessMessages; IdAntiFreeze1.Process; Memo2.Lines.LoadFromFile('HTTPProxies.txt'); try Memo1.Text := IdHTTP1.Get('http://proxy-list.org/downloadproxylist.php?sp=-1&pp=any&pt=any&pc=any&ps=any'); except end; Memo2.Text := Memo2.Text + Memo1.Text; DeleteCopy(Memo2.Lines); Memo2.Lines.SaveToFile('HTTPProxies.txt'); Label1.Caption := '600'; end; end.
|