I am writing a script that is initiated every time a contact signs on to Adium. My goal is for a growl message to appear when certain friends log on. Everything works except I do not know how to get the "display name" from the contact that just signed in.
Here is the code:
tell application "Adium"
#Get the alias of the contact that just signed on:
get display name of contact #most recently signed in (HOW DO I RESPRESENT THIS)
#Jon
if display name of contact is "Jon" then
tell application "GrowlHelperApp"
-- Make a list of all notification types:
set the allNotificationsList to ¬
{"Jon"}
-- Make a list of the default enabled notifications:
set the enabledNotificationsList to ¬
{"Jon"}
-- Register the script with Growl
register as application ¬
"AdiumFriends" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "AdiumFriends"
-- Send a notification:
notify with name ¬
"Jon" title ¬
"Jon signed on" description ¬
¬
"Facebook" application name "AdiumFriends"
end tell
end if
end tell
but you can start a script when a contact logged in. That script could check the name and if it matches with your desired it'll give you a shout