Get alias/display name of current user?

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
ThreeDee912
Harmless
Posts: 2
Joined: Tue Aug 21, 2007 10:49 am
Contact:

Get alias/display name of current user?

Post 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.
G4 "Quicksilver", 733 mHz, 10.4.10, 1.25gb RAM
G3 B&W, 450 mHz, 10.4.10, 1GB RAM
Post Reply