ini文件的格式是这样的。[App1]
path='...'
time='...'[App2]
path='...'
time='...'...
如何通过循环的方式读取App1、App2、...的Time值?在不清楚App1、App2、的值的情况下。就是说不用readString('App1','Time','');这样的方法来读取Time值。

解决方案 »

  1.   

    是不是这样的操作我得换Xml配置啊?我用这个来做软件的定时安装,想通过ini来读取哪些软件(APP)需要安装。
      

  2.   

    ReadSections这个也没有什么数组之类的返回值啊。怎么读啊?能举个例子吗?不好意思麻烦啦
      

  3.   

    var
      apps,times:TStrings;
       AppIni:tinifile;
       i:integer;
    begin
       AppIni := TIniFile.Create('date.ini');\\路径
       times:=tstringlist.Create;
       apps:=tstringlist.Create;
       AppIni.ReadSections(apps);
      AppIni.ReadSections(times);
      for i:=0 to apps.Count-1 do
    begin
    times[i]:=appini.readString(Apps[i],'Time','');
    end;
    end;
      

  4.   

    ReadSections的参数怎么确定。我是不知道App的字符串值的
      

  5.   

    ReadSections是读里面的section,参数当然是个tstrings
    没看见上面给你的代码?