Overlapping dimension text

Hello,

I found a way to offset an overlapping dimension text by selecting a single dimension string on this post, is there a way to pass multiple dimensions and have the scrip do a loop?

I do not have enough experience with Python to do it and the scrip is not in English.

Thanks =)