-- unread_list.applescript -- iFaces -- Created by Jason Corso on Thu Nov 13 2003. -- Copyright (c) 2003 __MyCompanyName__. All rights reserved. property gb_messages : {} set gb_messages to {} set m_unreadcount to "0" --tell application "Mail" -- set m_unreadcount to unread count of inbox -- if (m_unreadcount is greater than 0) then -- set m_messages to (messages of inbox) -- set m_i to count of m_messages -- set m_counted to 0 -- repeat until m_counted is m_unreadcount or m_i is 0 -- set fooMSG to item m_i of m_messages -- set m_i to m_i - 1 -- if read status of fooMSG is false then -- set m_counted to m_counted + 1 -- set m_sender to extract address from (sender of fooMSG as string) -- set m_subject to (subject of fooMSG as string) -- set gb_messages to gb_messages & {m_sender & "|" & m_subject} -- end if -- end repeat -- end if --end tell --return gb_messages --set theUnreads to {} -- Contribution by Ralf Stoye tell application "Mail" set theMeggs to (messages of inbox whose read status is false) repeat with aMess in theMeggs set thisSet to (extract address from sender of aMess) & "|" & (subject of aMess) set gb_messages to gb_messages & {thisSet} end repeat end tell return gb_messages