Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, CLIPBrd;
- type
- TForm1 = class(TForm)
- Button1: TButton;
- procedure FormCreate(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- ip: TStringList;
- i:integer = 0;
- implementation
- {$R *.dfm}
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- ip:=TStringList.Create;
- ip.LoadFromfile('ip.txt');
- end;
- procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- ip.free;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- if i<ip.Count-1 then
- begin
- Clipboard.AsText:=ip[i];
- inc(i);
- end
- else
- begin
- Clipboard.AsText:=ip[i];
- i:=0;
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement