IniRead读取问题
$EvePath = @TempDir& "\"RunWait($EvePath & "Everest /r /ini Report /SUM /SAFEST", $EvePath, @SW_HIDE)
$zhuban=IniRead($EvePath & "Reports\report.ini", "概述", "主板|主板名称", "")
$xianka=IniRead($EvePath & "Reports\report.ini", "概述", "显示设备|显示卡1", "")
MsgBox(0,"","主板: " & $zhuban & @CRLF _
& "显卡: " & $xianka)
读取的时候,怎么才能做到
源 字符串: 主板|主板名称=ECS GeForce6100PM-M2 (2 PCI, 1 PCI-E x1, 1 PCI-E x16, 2 DDR2 DIMM, Audio, Video, LAN)
只读取 ECS GeForce6100PM-M2 后边的这些不读取 (2 PCI, 1 PCI-E x1, 1 PCI-E x16, 2 DDR2 DIMM, Audio, Video, LAN)
谢谢, $aa=StringSplit($zhuban, "(")
msgbox(0,"",$aa) $aa=StringSplit($zhuban, "(")
msgbox(0,"",$aa)
the886 发表于 2011-3-6 03:40 http://www.autoitx.com/images/common/back.gif
谢谢,已经解决. 看到头晕了。还是先去打酱油吧。~ 用正则提取吧,比较方便
$zhuban='主板|主板名称=ECS GeForce6100PM-M2 (2 PCI, 1 PCI-E x1, 1 PCI-E x16, 2 DDR2 DIMM, Audio, Video, LAN)'
$a=StringRegExp($zhuban,'[^=/(]+',3,2)
MsgBox(0,"",$a) 回复 3# gfuchao
你这个函数提取的不是你想要的吧? 路过看看,好东西,学习了 学下下。。谢谢分享
页:
[1]