Advertisement
Golden_Rus

IP list

Oct 31st, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.96 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7.   Dialogs, StdCtrls, CLIPBrd;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     procedure FormCreate(Sender: TObject);
  13.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  14.     procedure Button1Click(Sender: TObject);
  15.   private
  16.     { Private declarations }
  17.   public
  18.     { Public declarations }
  19.   end;
  20.  
  21. var
  22.   Form1: TForm1;
  23.   ip: TStringList;
  24.   i:integer = 0;
  25. implementation
  26.  
  27. {$R *.dfm}
  28.  
  29. procedure TForm1.FormCreate(Sender: TObject);
  30. begin
  31. ip:=TStringList.Create;
  32. ip.LoadFromfile('ip.txt');
  33. end;
  34.  
  35. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  36. begin
  37. ip.free;
  38. end;
  39.  
  40. procedure TForm1.Button1Click(Sender: TObject);
  41. begin
  42.   if i<ip.Count-1 then
  43.   begin
  44.     Clipboard.AsText:=ip[i];
  45.     inc(i);
  46.   end
  47.   else
  48.   begin
  49.     Clipboard.AsText:=ip[i];
  50.     i:=0;
  51.   end;
  52. end;
  53.  
  54. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement