The RoLLing cOde

Rumor, crap and –un–original

Quick filter by mail topic in Microsoft Entourage

leave a comment »

This script will filter mails by topic ( actually subject without “Re:” and “Fw:” ) of the selected message.

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.

Written by freewizard

2008-10-23 at 09:43

Posted in Crap

Tagged with

Leave a Reply


To prove you're a person (not a spam script), type the answer to the math equation shown in the picture.
Anti-spam equation