|
发表于 2020-11-29 08:58:09
|
显示全部楼层
现在不能熬夜了。早上想了一下,不用改配置文件格式,不然又要更改读取方式。
你参考一下:
Func _Save()
$dira = @ScriptDir & "\test3.ini"
Local $cont = _GUICtrlListView_GetItemCount($ListView1);取得数组的行列数
$h1 = ""
For $id = 0 To $cont - 1
$str = _GUICtrlListView_GetItemTextArray($ListView1, $id)
$ha = "00" & $id + 1
$h2 = $str[2]
$h3 = $str[3]
$h4 = $str[4]
$h5 = $str[5]
If $h4 = '男' Then
$Mode = 1
Else
$Mode = 0
EndIf
If $h5 = '可以修改' Then;
$PW = 1
Else
$PW = 0
EndIf
;MsgBox(0, "提示", $h2)
IniWrite($dira, $ha, "UserName", $h2)
IniWrite($dira, $ha, "PassWord", $h3)
IniWrite($dira, $ha, "PwMode", $Mode)
IniWrite($dira, $ha, "UserMode", $PW)
Next
EndFunc ;==>_Save
|
|