0
이러한 함수에서 relactive 경로를 사용하는 올바른 방법은 무엇입니까? 일부만 시도했지만 절대 경로 만 제대로 작동했습니다. 다음은 몇 가지 코드 샘플입니다. 감사!f.LoadFromfile 및 f.SaveToFile의 상대 경로
Procedure test;
Var
f : TStringList;
trash: Cardinal;
TempTime,SumTime : Cardinal;
TimeInterno : TDateTime;
begin
f := TStringList.Create;
f.LoadFromfile('D:\test\Ignores.txt');
for Loop := 0 to f.Count-1 do
begin
Ignore(f.Strings[Loop].tointeger);
end;
f.Free;
FindType(-1,trash);
TimeInterno := Now;
f := TStringList.Create;
if not FileExists('D:\test\Ignores.txt') then
begin
f.SaveToFile('D:\test\Ignores.txt');
end;
Wait(100);
if FileExists('D:\test\Ignores.txt') then
begin
f.SaveToFile('D:\test\Ignores.txt');
Wait(100);
f.LoadFromfile('D:\test\Ignores.txt');
end;
f.add(IntToStr(findType(-1,Ground)));
f.SaveToFile('D:\test\Ignores.txt');
f.Free;
Ignore(trash);
Wait(200);
trash := FindType(-1,Ground);
UseObject(trash);