So I have a gui that has a text box. In this text box, I expect my users to copy and paste data. The data will usually have multiple lines such as:
Code: Select all
This-Is-Line-One
This-Is-Line-Two
And-This-Is-Line-three
I am trying to get to where I can eventually use an array to call on each line at a time. To do this, I am attempting to use StrSplit. I have been able to get it to work when I use a "," but for some reason I can't get it to work with a new line/return.
Here is my code below, please assist.
This one doesn't work and is what I want to work using new line or return
Code: Select all
GuiControlGet, codesList
list := StrSplit(codesList, "'n")
Answer := list[2]
listLength := list.MaxIndex()
MsgBox, The second item is %Answer%
This works just fine using a comma, but that isn't what I want to use to separate based on the items we will be copy/pasting to the field.
Code: Select all
GuiControlGet, codesList
list := StrSplit(codesList, ",")
Answer := list[2]
listLength := list.MaxIndex()
MsgBox, The second item is %Answer%