It works perfectly fine, but it is not practical to add new lines of long text to the code.
So I wonder if it is possible editing it to have each text-line in its own separated line in the code, instead of having all text-lines of each list in one single line, as it is right now.
For instance instead of having each list like this:
better have them similar to something like this:list = 1st text-line,2nd text-line,3rd text-line,4th text-line
I've tried several options I know, but all I get are blank lines.list =
1st text-line,
2nd text-line,
3rd text-line,
4th text-line
This is my current code:
Code: Select all
Random, rand1, 1, 4
Random, rand2, 1, 4
Random, rand3, 1, 4
; Definining 3 lists of text lines:
list1 = 1st text-line,2nd text-line,3rd text-line,4th text-line
list2 = 5th text-line,6th text-line,7th text-line,8th text-line
list3 = 9th text-line,10th text-line,11th text-line,12th text-line
; Selecting randomly one text-line from each list:
selectedLine1 := strsplit(list1,",")[rand1]
selectedLine2 := strsplit(list2,",")[rand2]
selectedLine3 := strsplit(list3,",")[rand3]
; Concatenating the 3 selected text-lines and copy them to the clipboard:
clipboard = %selectedLine1%`n%selectedLine2%`n%selectedLine3%
; Seeing the result on a message box:
msgbox, Randoms: %rand1%, %rand2%, %rand3%`nSelected lines:`n%selectedLine1%`n%selectedLine2%`n%selectedLine3%