Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use GeekTool to see new Mail messages on the desktop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use GeekTool to see new Mail messages on the desktop
Authored by: mv123 on Jun 27, '09 02:12:33AM

Hi! Thanks for the hints.
When I try this it gives me the Unread count of the Inbox. Is there a way to get unread count of all mailboxes as I have Rules applied to my Mail app. I have set my Dock count to give Unread in all boxes but not able to replicate that in the script.
Thank you



[ Reply to This | # ]
Use GeekTool to see new Mail messages on the desktop
Authored by: Emeraldscorpion on Aug 20, '09 08:01:54AM
I've written this applescript:
tell application "System Events" to set iCalIsRunning to (name of processes) contains "Mail"
set finalText to ""
if iCalIsRunning then
	tell application "Mail"
		set unreadCount to unread count of inbox
		if (unreadCount is greater than or equal to 1) then
			return (unreadCount as string) & " new messages"
		else
			set finalText to "No new Mail"
		end if
	end tell
	
else
	set finalText to "Mail not open"
end if 
It tells you how many unread Mail there are / That there is no Mail / Mail is not open. I stiched this together from different people's scripts :P

[ Reply to This | # ]