unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls, ExtDlgs;
type
TForm1 =
class(TForm)
MainMenu1: TMainMenu;
File1: TMenuItem;
Saveas1: TMenuItem;
Savedirectionfile1: TMenuItem;
Help1: TMenuItem;
Howtouse1: TMenuItem;
About1: TMenuItem;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
SaveDialog1: TSaveDialog;
OpenDialog1: TOpenDialog;
Button1: TButton;
procedure About1Click(Sender: TObject);
procedure Saveas1Click(Sender: TObject);
procedure Savedirectionfile1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Steampath: TStringList;
mysteampath: Textfile;
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.About1Click(Sender: TObject);
begin
UNWICHTIG, RAUSGENOMMEN
end;
procedure TForm1.Saveas1Click(Sender: TObject);
begin
// Öffnen der txt Datei mit dem Pfad, damit man es nicht immer neu schreiben muss
try
steampath.LoadFromFile('
mysteampath.txt')
except
showmessage ('
Error opening the file!')
end;
try
edit1.Text := steampath.text;
except
showmessage ('
Error opening the file!')
end;
end;
procedure TForm1.Savedirectionfile1Click(Sender: TObject);
begin
// Speichern der TXT Datei
try
Steampath.text := Edit1.text;
except
showmessage ('
Error saving the file!');
end;
try
steampath.SaveToFile('
mysteampath.txt')
except
showmessage ('
Error saving the file!');
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
steampath := Tstringlist.create;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
// Hier ist mein Problem, denn * und edit1.Text sind 2 inkompatible Typen
steampath.text := edit1.text;
if fileexists ('
*/info.txt')
then
movefile ('
*', edit1.text)
end;
end.