unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus, Comctrls, Commctrl,ShellApi, Mask;
type
TForm1 =
class(TForm)
Edit3: TEdit;
edit1: TEdit;
Generieren: TButton;
Memo1: TMemo;
urlEdit1: TEdit;
Speichern: TButton;
procedure GenerierenClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure SpeichernClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
edit1.Text:='
%d.jpg'; edit3.Text:='
20';
memo1.Text:='
';
end;
procedure TForm1.GenerierenClick(Sender: TObject);
var
i, iStop, iStart: Integer;
a:
string;
begin
a := edit1.text;
iStart := 0;
iStop := strtoint(edit3.text);
UrlEdit1.Text := '
<img src="' +a+ '
"alt=""border="0" /
';
for i := iStart
to iStop
do
memo1.lines.Add(Format(UrlEdit1.Text, [i]));
end;
procedure TForm1.SpeichernClick(Sender: TObject);
var
Datei: TextFile;
begin
AssignFile(Datei, ExtractFilePath(Application.ExeName) + '
list.html');
Rewrite(Datei);
try
WriteLn(Datei, memo1.text);
finally
CloseFile(Datei);
if Shellscripten(Application.Handle,
'
open',
PChar('
D:\Dokumente und Einstellungen\Admin\Desktop\list\list.html'),
Nil,
Nil, SW_NORMAL) <= 32
then
ShowMessage('
Es ist ein Fehler aufgetreten');
memo1.Text:='
';
end;
end;
end.