Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Mail Checker Applescript Help

Mail Checker Applescript Help
Thread Tools
Dedicated MacNNer
Join Date: Aug 2003
Status: Offline
Reply With Quote
Feb 12, 2004, 01:19 AM
 
I am writing a script to check my email and need some help with it. Basically I have a .mac account that I use in conjunction with mail.app. I do not use the dock, so I have no icon with the number of new messages and I don't want to use anything bloated like konfabulator. The perfect solution is just for a small dialog to pop up telling me I have new mail. This is what I have so far:

display dialog "You've got mail." buttons {"Read", "Ignore"}

if button returned of result = "Read" then
tell application "Mail"
activate
set theViewer to make new message viewer
end tell
end if
Then I have a rule set in mail for every message to run this script. Here are the issues I am having...

1. If there is already an instance of mail open, it opens a new blank viewer. If not then it works as plan and simply opens my inbox.

2. if I have mail hidden, the script with be hidden also when it runs, presumably because the rule comes from mail which is hidden.

So here is what I want for it.

New Mail arrives, runs applescript and pops up dialog that states "You've got Mail." "2 new messages" It would then present two options, ignore or read. If you click ignore it would simply go away, if you click read it would open up the inbox. If the app is hidden, it would unhide it and if the window was closed it would start a new instance opening the inbox instead of just moving the menu bar to the front.

So, I don't know if I am on the right track or not. Also, if someone knows how to do this, it should be fairly simple for an experienced programmer, I would be willing to pay say 10 dollars or so for it.

Thank you everyone.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:59 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2