Habe es jetzt mal so gemacht.
Delphi-Quellcode:
procedure TMidiTracker.SaveFile;
var
IntA: Integer;
IntB: Integer;
Temp: String;
f: Textfile;
myFile: string;
begin
myFile := SKAERO_SaveFileDialog(MainHandle, 'MidiTracker files (*.mtf*)|*.mtf*', 'mtf', 'MediTrackerFile');
AssignFile(f, myFile);
for IntA := 0 to 7 do
begin
TrackLength := 0;
for IntB := 1000 downto 0 do
begin
if Grid[IntA, IntB] > -1 then
begin
TrackLength := IntB;
break;
end;
end;
Temp := '';
for IntB := 0 to TrackLength do
Temp := Temp + IntToStr(Grid[IntA, IntB]) + ',';
Writeln(f, LeftStr(Temp, Length(Temp) - 1)); // <<<<< Error EInOutError I/O Error 103
Temp := '';
for IntB := 0 to TrackLength do
Temp := Temp + IntToStr(InstGrid[IntA, IntB]) + ',';
Writeln(f, LeftStr(Temp, Length(Temp) - 1));
end;
Writeln(f, IntToStr(Tempo));
Temp := '';
for IntA := 0 to 7 do
Temp := Temp + IntToStr(CurrentInst[IntA]) + ',';
Writeln(f, LeftStr(Temp, Length(Temp) - 1));
Closefile(f);
end;
Bekomme aber beim ersten zugriff einen EInOutError I/O Error 103.
Funktioniert das mit SaveDialog nicht?
gruss