¡Hola! and thank you both for your suggestions.
Yes, the shift register in place of Line Counter local really cleans things up. For some odd reason I was confusing a shift register with an auto-indexing something-or-other, and I didn't realize I could control the incrementing with the Case. It looks slightly cleaner now:
![SendFileSnippet2.png SendFileSnippet2.png]()
(the False cases are both empty, except for a straight-through wiring of the shift register)
I could try to get rid of the remaining local variables and perhaps one of the buttons by using a latch (which would also get rid of the outer sequence), but I did want to retain the existing behavior, which enables:
- Sending one line at a time, and/or
- Sending the file all at once, either from the beginning or from a pause, and/or
- Pausing in the middle of a mass-send.
If I get rid of Send and just pause or not-pause, I won't have fine control over sending one line at a time. But I'm all ears if you have a suggestion in this regard!
Could I use a classic For loop with an event-driven pause? That would eliminate the Line Counter and just auto-index through the string array, wouldn't it? I actually started out with a For loop, but couldn't figure out how to pause/resume it, which is why I switched to a While/Case structure.