Just change the "_X" to either "_:L" or "_+.:E:S:L" in my original code.
Why remove the while loop?
The problems are:
1) It allows more than one object to be selected (not sure how since I applied the "_:S" filter as suggested to the ssget function.
2) It also allows the user to select a block that has attributes that are not the same and change them all to the user defined string from the "getstring" function.