set the_user to the second word of (characters (offset of "Users" in path to ¬
preferences as string) through (length of (path to preferences as string)) of ¬
(path to preferences as string) as string)
display dialog "The current user is " & the_user
A simple little thing that might be of benefit.

