The stimuli I will be using have set limitations of 30 words total and 12 characters per word (not including punctuation marks). I think having each blank be a set length, possibly 4 or 5 underscores long, would allow all of the information to appear on the page relatively cleanly (29 blanks x 4 underscores, one word <13 characters, 29 spaces, 2 punctuation marks would be 159 characters). The one concern with having the blanks be potentially shorter than the words is when a word gets displayed the entire string will shift around to display the characters which might be disorienting for a participant to follow along with. I’ll need to think about that and weigh that against being able to predict the length of a word before it gets displayed.
I’ll probably have more questions for you tomorrow but I’ll see what I can do in the mean time with the code you have provided. Thanks again for all of the help, I really appreciate it.