Archive for the ‘Entourage’ tag
Script Entourage messages to The Hit List
The Hit List is a good task management software for Mac OSX, and I personally think it’s better than OmniFocus and Things.
tell application "Microsoft Outlook"
set |inbox| to current messages
repeat with theMessage in |inbox|
set theTitle to subject of theMessage
set theNotes to (content of theMessage) & return
set theID to id of theMessage as string
set theCommand to "mdfind com_microsoft_entourage_recordID==" & theID
set theMDfile to the first item of paragraphs of (do shell script theCommand)
set theDate to time received of theMessage
tell application "The Hit List"
tell inbox to set theTask to make new task with properties {title:theTitle & " @email", notes:theNotes, start date:theDate}
tell notes of theTask to make new attachment with properties {file name:theMDfile} at after the last paragraph
end tell
set msgLen to the length of theNotes
if msgLen > 120 then
set theNotes to get text 1 through 120 of theNotes
set theNotes to theNotes & "..."
end if
tell application "GrowlHelperApp" to notify with name "New Email" title (theTitle) description (theNotes) application name "Entourage Growl Notifier" priority 0 sticky no icon of application "The Hit List"
end repeat
end tell
To use this as a mail rule, in Entourage, open menuToolsRules, add a new rule with “Run AppleScript” as its action.
To use this as a menu item or hotkey script, copy the script to ~/Documents/Microsoft User Data/Entourage Script Menu Items/ , it’ll appear in the Script menu of Entourage.You can even add a \cT after it’s name so that it will be triggered when you press Ctrl-T.
Quick filter by mail topic in Microsoft Entourage
Save the following AppleScript code as ~/Documents/Microsoft User Data/Entourage Script Menu Items/Quick FiltercF
on ltrim(someText)
repeat until first character of someText is not in {" ", tab, ASCII character 10, return, ASCII character 0}
set someText to text 2 thru -1 of someText
end repeat
return someText
end ltrim
on run
tell application "Microsoft Entourage"
--activate
set msgs to the current messages
if msgs is {} then return
repeat with msg in msgs
set subj to get the subject of msg
end repeat
set AppleScript's text item delimiters to {":"}
set tpc to last text item of subj
end tell
set tpc to my ltrim(tpc)
set the clipboard to tpc
tell application "System Events" to tell process "Entourage"
delay 0.1
keystroke tab
delay 0.1
keystroke "v" using command down
keystroke tab
end tell
end run
Make sure quick filter is turned on (Cmd-Shift-L);
Click one item in the messages list;
Click script menu and select our script.