I often need this functionality as well, yet I never came to scripting it.
So I initially wanted to edit the script you posted, yet it was not structured in a useable way.
Note that Unrolling is doen with the options: Explode=No Labels=No
To change this in the script, open it in notepad (or alike) and change the No to Yes to your liking
str = "_UnrollSrf Explode=No Labels=No Enter"
Please double check results (initially) the script is presented as-is use is at your own risk.