加载当前路径所有INI的key为变量

RunWait, %ComSpec% /c dir /b /A-D *.ini>%A_Temp%list.tmp, , Hide ;CMD获取文件列表
FileRead, list, %A_Temp%list.tmp ;读取
StringReplace, list, list, `r, , All ;替换回车符
StringSplit, file, list, `n, ;分割
Loop
{
if A_Index > %file0%
	Break
tmpfile = % file%A_Index%
FileRead, filecontent, %tmpfile% ;加载文件到变量
StringReplace, list, list, `r, , All
StringSplit, line, filecontent, `n, , ;用函数分割变量为数组
Loop ;循环
{
if A_Index > %line0%
	Break
content = % line%A_Index% ;赋值当前行
StringReplace, content, content, `r, , All ;替换特殊字符
FKey := RegExMatch(content, ".*=.*") ;正则表达式匹配key
if FKey = 1
	{
	TKey := RegExReplace(content, "(.*)=.*", "$1") ;正则替换并赋值临时key
	TValue := RegExReplace(content, ".*=(.*)", "$1") ;正则替换并赋值临时value
	IfNotInString, Tkey, | ;不包含|
		%TKey% = %TValue% ;赋值
	Else ;包含|
		{
		StringSplit, keys, TKey, |, ;分割
		Loop ;循环赋值
		{
		if A_Index > %keys0%
			Break
		tmpkey = % keys%A_Index%
		%tmpkey% = %TValue%
		}
		}
	}
}
}
ListVars
Pause

给TA捐赠
共{{data.count}}人
人已捐赠
其他

加法运算

2020-3-9 1:34:44

其他教程

动图

2020-3-9 1:36:44

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索