嘗試在自動熱鍵中讀取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) –