If the function is invalid, it will highlight in red. Keep in mind that the expression may be invalid simply because a variable it references does not yet have a value.
So I assume this is Keyboard Maestro telling me it can't get the value of that line of the array value…but the red makes it look like this will fail. But it works fine, of course.
At a minimum, the Variable Arrays wiki page should probably mention that "red text is OK in this instance," but personally, I don't think it should be red if given it's an allowed construct. Is this a "just me" thing?
I think red means "I can't evaluate this right now." Personally, I don't see any problem in that being the meaning of red. In your case, the only reason it can't be evaluated is that the variable is an Instance variable.
To be honest, I never knew you could use indexing when a field required a variable. Thanks for the tip.
Note: If you test the above, make sure you change the first "If" action's Local_text to Local_text[1]\n -- exporting the macro deletes the "invalid" characters.
AFAIK you can only use custom array delimiters in text tokens.
I thought it did…but it was late last night and I'd been fighting SQL and KM for hours ... testing again this morning, "umm, never mind." Moderators, get this man a vacation. Readers, ignore this topic :).