Feature Addition: repurpose choice=Question?-answers in different lists #195
Replies: 2 comments 1 reply
-
I think you can try this: use Split and Choice, whereby you use a special character (here $) to split the selected choice into two parts so you can use one element of it via
You could do something similar with |
Beta Was this translation helpful? Give feedback.
-
AutoHotkey can read Excel files directly but as you can edit CSV directly in Excel too that might be easiest. So this is your CSV file:
We need to pre-process it to make it suitable for ; add this to plugings\MyFunctions.ahk and restart
CSVData(file,char="$")
{
global ParseEscapedArray
FileRead, data, %file%
Loop, parse, data, `n, `r
{
line:=A_LoopField
Loop, parse, line, CSV
{
insert:=A_LoopField
insert:=StrReplace(insert,"[",ParseEscapedArray[1]) ; escape [ <SB
insert:=StrReplace(insert,"]",ParseEscapedArray[2]) ; escape ] >SB
insert:=StrReplace(insert,"|",ParseEscapedArray[3]) ; escape | ^SB
output .= insert char
}
output .= "|"
}
Return Trim(output,"|")
} Update the snippet to this (change file name/path to data.csv of course, it assumes it is in the lintalist folder):
If you use [1] See https://lintalist.github.io/#Functions Edit: more robust csvdata() |
Beta Was this translation helpful? Give feedback.
-
Hello,
I don't have the know-how to do so myself, so I can't do a pull request for this. Instead, I am opening an Issue. I am sorry.
lintalist can do a lot, and it is awesome in many ways, some of which I haven't had the need to explore yet. But there is one feature that, to my knowledge, doesn't exist - or I don't know how to make it work properly.
Take the following template:
Right now, I have to choose the same surname twice to first choose the name I want to address, then choose the corresponding email address.
Is there a way to merge these two into one question, perhaps by creating two arrays from those choices, then index into the second array with the chosen index of the first one? In that way, you could have an indirect mapping even though the key to that array would be a different one. I don't know how lintalist works under the hood sadly, so I can't really point to where this would be implemented. I hope I got the idea across well enough.
Thank you,
Sincerely,
~Gw
Beta Was this translation helpful? Give feedback.
All reactions