Get alias/display name of current user?
Posted: Wed Sep 05, 2007 11:13 am
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:
I do know iChat has something like this.
This is my applescript:
But then it sometimes returns the wrong name when there are multiple chats open.
Any help would be appreciated.
In an away message, it would be like this:
Not like this:Hi, Joe Smith, I'm away right now.
Help would be appreciated.Hi, joe16287, I'm away right now.
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 substituteAny help would be appreciated.