I want to get the nickname of the currently logged in OS X user via Apple Script. Currently can only retrieve the full name or the nickname of a contact, I wasn't able to combine the two scripts.
tell application "System Events" get full name of current user end tell
Returns my full name.
tell application "Contacts" to get nickname of person "My Name"
Returns my nickname.
I'd like to get the nickname of the vcard of the currently logged in user.