尝试在自动热键中读取CSV文件,并逐行将行拆分为“,”以提取每行的最后两列。目前只是试图让字符串拆分成数组。我可以用行 MsgBox, A_LoopReadLine
打印每行,但不能在变量内分割字符串。将数组中的字符串拆分为数组autohotkey
已经尝试了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的制表符分隔字符串(https://stackoverflow.com/q/45620437/3357935) –