I've been working on a script that requires you to enter a username that is always equal to or less than 32 characters. My goal is to add extra characters to the end of the string if it is less than 32 characters. For example, if I used the word "Taco", which is four characters, I'd need to add 28 filler characters to it to accomplish my goal.
Here's the code I have so far:
set localUN to "Taco" set UNLength to length of localUN set blanksToAdd to (32 - UNLength) set authID to localUN repeat blanksToAdd times set authID to authID & "█" end repeat
While this does work, it's a little slow to run, so I was hoping to find a better solution.