本帖最后由 starl 于 2009-5-7 11:41 编辑
各位大虾好!
配置文件部分内容如下:
[txt]
1=主板芯片组驱动
2=显卡驱动
3=声卡驱动
4=蓝牙驱动
5=EDGE驱动
6=触摸屏驱动
7=CMMB驱动
8=CDMA驱动
9=无线网卡驱动
[sys]
1=C:\WINDOWS\system32\drivers\acpi.sys
2=C:\WINDOWS\system32\drivers\ADIHdAud.sys
3=C:\WINDOWS\system32\drivers\1.sys
4=C:\WINDOWS\system32\drivers\1.sys
5=C:\WINDOWS\system32\drivers\1.sys
6=C:\WINDOWS\system32\drivers\1.sys
7=C:\WINDOWS\system32\drivers\1.sys
8=C:\WINDOWS\system32\drivers\1.sys
9=C:\WINDOWS\system32\drivers\1.sys
部分测试脚本如下:
$chksys1 = IniRead("venusdriver.ini","sys","1","NotFound")
$chksys2 = IniRead("venusdriver.ini","sys","2","NotFound")
$chksys3 = IniRead("venusdriver.ini","sys","3","NotFound")
$chksys4 = IniRead("venusdriver.ini","sys","4","NotFound")
$chksys5 = IniRead("venusdriver.ini","sys","5","NotFound")
$chksys6 = IniRead("venusdriver.ini","sys","6","NotFound")
$chksys7 = IniRead("venusdriver.ini","sys","7","NotFound")
$chksys8 = IniRead("venusdriver.ini","sys","8","NotFound")
$chksys9 = IniRead("venusdriver.ini","sys","9","NotFound")
$txt1 = IniRead("venusdriver.ini", "txt", "1", "NotFound")
$txt2 = IniRead("venusdriver.ini", "txt", "2", "NotFound")
$txt3 = IniRead("venusdriver.ini", "txt", "3", "NotFound")
$txt4 = IniRead("venusdriver.ini", "txt", "4", "NotFound")
$txt5 = IniRead("venusdriver.ini", "txt", "5", "NotFound")
$txt6 = IniRead("venusdriver.ini", "txt", "6", "NotFound")
$txt7 = IniRead("venusdriver.ini", "txt", "7", "NotFound")
$txt8 = IniRead("venusdriver.ini", "txt", "8", "NotFound")
$txt9 = IniRead("venusdriver.ini", "txt", "9", "NotFound")
For $sysi = 1 to 9
MsgBox(64,"",Eval("sys" & $sysi))
Next
这个读取配置文件里面的sys段读取时失败
For $sysi = 1 to 9
MsgBox(64,"",Eval("txt" & $sysi))
Next
这个读取配置文件里面的txt段读取可以成功
注:这个配置文件是在网上下的,txt段是原配置文件已经写好的,sys段是我自己加进去的,可是测试下就是读取失败!
搜索了下论坛,说将配置文件里面的 "=" 号换成半角的,试了也不行,不知道原因出在哪了,希望好心朋友帮忙测试下,谢谢!@ |