I'm going to be making images that include hundreds of lines of text of varying lengths, each of which will have the same "background", with the exception of the length of the background, which will need to be relative to the length of the text. I want to not have to manually fit text to a box each time.
The second twist is that I want the background to be reduced opacity, but I want the text to be 100% opacity.
So the text will always be the same size and solid white, over a (say) 80% opacity orange background. The "padding" (inset?) on all four sides of the text the text will be constant relative to the text. All that will change is the overall width of the text string, consistent with the overall width of the "box".
I have reviewed these two answers
How to fit text box size to text?
and
Change Background Color of Text Box in Illustrator CS5
which would seem to address this but don't quite. I am using Illustrator CS6.