Page 1 of 1

Get alias/display name of current user?

Posted: Wed Sep 05, 2007 11:13 am
by ThreeDee912
I'm trying to get the display name (not the account name) of a person who just messaged me in Adium. I'm planning to use this as a AdiumExtra, where the name is simply returned.

In an away message, it would be like this:
Hi, Joe Smith, I'm away right now.
Not like this:
Hi, joe16287, I'm away right now.
Help would be appreciated.

I do know iChat has something like this.

This is my applescript:

Code: Select all

global currentContact
on substitute()
   tell application "Adium"
       try
           set currentContact to chat name of the active chat of the first interface controller
       on error
           set currentContact to "person"
       end try
   end tell
   return currentContact
end substitute
But then it sometimes returns the wrong name when there are multiple chats open.

Any help would be appreciated.