Determine text width

Is there a way of deteremining the width of a specific string of text in the default font?

There is a library called “StyledTextToRecord” which picks styled text as input, then returns info about such styled text (including width). Just in case you can use it:
http://www.macscripter.net/scriptbuilders/category.php?id=1911