how to show unread emails with geektool??

Discussion in 'Mac Apps and Mac App Store' started by DaKyd55, Jul 29, 2010.

  1. DaKyd55 macrumors member

    Jul 3, 2010
    can someone give me a step to step explanation not just a link thanks.:D
  2. TA99 macrumors newbie

    May 22, 2011
    RE: how to show unread emails with geektools??

    Below is the script I use to show unread email in mail.
    1. Save and name the script (ie Inbox.scpt)
    2. Put the script in /Users/(yourname or computer)/Documents/
    3. Open shell command in GeekTool
    4. Input osascript /Users/(yourname or computer)/Documents/(name of the script)


    set messageList to {}

    tell application "Mail"
    repeat with pendingMessage in (messages of inbox whose read status is false and deleted status is false)
    tell pendingMessage

    --get sender's name
    set senderName to extract name from sender

    --if there is no name, or the address line is malformed, better to show just the address
    if senderName is equal to sender then
    set senderName to extract address from sender
    end if

    --mark flagged messages specially
    if pendingMessage is flagged status then
    set bullet to "» "
    set bullet to "• "
    end if

    copy bullet & tab & senderName & ":" & tab & subject & linefeed to end of messageList
    end tell
    end repeat
    end tell

    messageList as text

Share This Page