Advertisement
Guest User

Untitled

a guest
Sep 8th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tell application "GrowlHelperApp"
  2.     set the allNotificationsList to {"New Mail"}
  3.     set the enabledNotificationsList to {"New Mail"}
  4.     register as application ¬
  5.         "Entourage" all notifications allNotificationsList ¬
  6.         default notifications enabledNotificationsList ¬
  7.         icon of application "Microsoft Entourage"
  8. end tell
  9.  
  10. tell application "Microsoft Entourage"
  11.     set theMessages to the current messages
  12. end tell
  13. repeat with theMsg in theMessages
  14.     tell application "Microsoft Entourage"
  15.         set mysubject to get the subject of theMsg
  16.         set mysender to the display name of sender of theMsg as string
  17.         set mycontent to get the content of theMsg as string
  18.         set mypriority to the priority of theMsg as string
  19.         if mysender is "" then
  20.             set mysender to the address of sender of theMsg as string
  21.         end if
  22.     end tell
  23.     tell application "GrowlHelperApp"
  24.         if mypriority is "high" then
  25.             notify with name "New Mail" title mysubject description (mycontent) application name "Entourage" sticky yes
  26.         else                         (*changed to mypriority for testing*)
  27.             notify with name "New Mail" title mypriority description (mysubject) application name "Entourage" sticky no
  28.         end if
  29.     end tell
  30. end repeat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement