Growl notify display Entourage 2008 contact pictures
Posted: Thu Jun 12, 2008 6:06 pm
I'd like to have growl notifier show the contact picture from Entourage 2008 Contacts.
I got my script to read the image data but it always shows the Application default icon in the notification popup.
I've tried with different file formats, starting by tiff.
It looks fine, even showing the image data with TIFF header, but still showing the default icon...
Any clue?
Here is my script and Event Log output.
tell application "GrowlHelperApp"
set the allNotificationsList to {"New Mail"}
set the enabledNotificationsList to {"New Mail"}
register as application ¬
"Entourage" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Microsoft Entourage"
end tell
tell application "Microsoft Entourage"
set theMessages to the current messages
end tell
repeat with theMsg in theMessages
tell application "Microsoft Entourage"
set mysubject to get the subject of theMsg
set mysender to the display name of sender of theMsg as string
set theContacts to (every contact where its display name contains {mysender})
set myimage to the image of item 1 of theContacts
if mysender is "" then
set mysender to the address of sender of theMsg as string
end if
end tell
tell application "GrowlHelperApp"
notify with name "New Mail" title "Incoming email" description (mysender & ": " & mysubject) application name "Entourage" image myimage
end tell
end repeat
Log Output
tell application "GrowlHelperApp"
register as application "Entourage" all notifications {"New Mail"} default notifications {"New Mail"} icon of application "Microsoft Entourage"
end tell
tell application "Microsoft Entourage"
get current messages
{incoming message id 18360}
get subject of incoming message id 18360
"This is my mail subject "
get display name of sender of incoming message id 18360
"Benjamin Linus"
get every contact whose display name contains {"Benjamin Linus"}
{contact id 339}
get image of contact id 339
{type:TIFF picture, data:«data TIFF4D4D002A00006E30FEFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFE...
(lines omitted)....
030000000100010000015300030000000300006ECC00000000000800080008000100010001»}
end tell
I got my script to read the image data but it always shows the Application default icon in the notification popup.
I've tried with different file formats, starting by tiff.
It looks fine, even showing the image data with TIFF header, but still showing the default icon...
Any clue?
Here is my script and Event Log output.
tell application "GrowlHelperApp"
set the allNotificationsList to {"New Mail"}
set the enabledNotificationsList to {"New Mail"}
register as application ¬
"Entourage" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Microsoft Entourage"
end tell
tell application "Microsoft Entourage"
set theMessages to the current messages
end tell
repeat with theMsg in theMessages
tell application "Microsoft Entourage"
set mysubject to get the subject of theMsg
set mysender to the display name of sender of theMsg as string
set theContacts to (every contact where its display name contains {mysender})
set myimage to the image of item 1 of theContacts
if mysender is "" then
set mysender to the address of sender of theMsg as string
end if
end tell
tell application "GrowlHelperApp"
notify with name "New Mail" title "Incoming email" description (mysender & ": " & mysubject) application name "Entourage" image myimage
end tell
end repeat
Log Output
tell application "GrowlHelperApp"
register as application "Entourage" all notifications {"New Mail"} default notifications {"New Mail"} icon of application "Microsoft Entourage"
end tell
tell application "Microsoft Entourage"
get current messages
{incoming message id 18360}
get subject of incoming message id 18360
"This is my mail subject "
get display name of sender of incoming message id 18360
"Benjamin Linus"
get every contact whose display name contains {"Benjamin Linus"}
{contact id 339}
get image of contact id 339
{type:TIFF picture, data:«data TIFF4D4D002A00006E30FEFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFE...
(lines omitted)....
030000000100010000015300030000000300006ECC00000000000800080008000100010001»}
end tell