【发布时间】:2016-08-19 05:56:36
【问题描述】:
尝试在 Auto Hot Key 中读取 CSV 文件,并用“,”逐行分割该行以提取每行的最后两列。目前只是试图让字符串拆分成一个数组。我可以用线打印每一行
MsgBox, A_LoopReadLine 但不能拆分变量内部的字符串。
尝试过 StringSplit 和 StrSplit 但我确信语法不正确。
MyArray := Object()
Loop, read, %fileop%
{
MyArray.Insert(A_LoopReadLine) ; Append this line to the array.
index := 1
MsgBox, %A_LoopReadLine%
;MyArray.
;MsgBox, % StrSplit(A_LoopReadLine ,",")
}
Loop % MyArray.Length()
MsgBox % StrSplit(MyArray[A_Index],",")
【问题讨论】:
标签: autohotkey