You sort of did it.

Quote:

this is based on the UDF from KiXscripts.com