Das Problem bei dem Code oben ist, dass er dann nicht "exec Binds.cfg" in die autoexec.cfg addet, sondern eine neues autoexec.cfg erstellt und es da drin addet.. aber somit die alte löscht...
Hier nochmal der Code:
Code:
...
sl:=TStringList.Create;
if (Checkbox2.checked = true) then begin
sl.Add('exec Binds.cfg');
sl.SaveToFile(Label16.Caption + '\autoexec.cfg');
end
else if (Checkbox2.checked = true) and (Label16.Caption +'\autoexec.cfg' = 'false') then begin
sl.LoadFromFile(Label16.Caption +'\autoexec.cfg');
if pos('exec Binds.cfg', sl.Text)=0 then begin
sl.Add('exec Binds.cfg');
sl.SaveToFile(Label16.Caption + '\autoexec.cfg');
end;
end;
end;
...
Bedanke mich schonmal für eure Bemühungen