我正在寫一個腳本,每次聯繫人登錄Adium時都會啓動該腳本。 我的目標是在某些朋友登錄時出現咆哮消息。 一切正常,只是我不知道如何從剛剛簽署的接觸得到的「顯示名稱」Adium Applescript咆哮通知
這裏是代碼:
告訴應用程序「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
末告訴