|
|
Use iCal to set a response reminder for a Mail message
Ok. After far too much time spent playing with this thing, I've come up with a modified version of the original script that has some changes I wanted.
What this script does not have is a way for iCal to bring up the specific message mentioned in the event when the reminder alarm goes off (if there is one). Further details are in the comments of the script. If anyone can figure out how to do it, that's amazing. I don't know enough to figure it out. Here's the script:
Use iCal to set a response reminder for a Mail message
I did try and include a way of getting the urL of the mail message to be put in the event, but could not get the message id to set to a variable name. I will keep trying, if anyone does have any ideas of how get into a variable then that would be great.
Use iCal to set a response reminder for a Mail message
I managed to do this. To get the message ID is not a big deal but to open a message with this ID is not that easy. To be able to do this you have to define the mailbox of the message (beside the ID). The trouble is that the mailbox property is broken in Tiger, and this is filed as bug by Apple. So far no fix. Till then your approach seems to be a nice workaround. If you are interested in the script let me know, I will gladly share it with you. Zsolt
Use iCal to set a response reminder for a Mail message
That would be nice thanks, I did figure the getting of the id. ie.
but have only got back today so have not gone further in working out how to get the path ---
Use iCal to set a response reminder for a Mail message
Hi Mark,
First to the ID, here is a short example how to get the ID
Open the event log history in the script editor and you will see all the properties of one message. The trouble is that if you tell to Mail to open message with that ID it will fail. As far as I remember you had to specify the ID and the mailbox to make it happen, even though, this would sometimes also fail, if you moved the message after you got the ID and mbox to be able to open it later on.
Nevertheless most of the time it worked.
In Tiger, as I said, the mailbox value is missing, which you willl clearly see in the output of the example I gave you above.
But your post remided me to something I overlooked. Now each message is a singe file, so knowing the path to it is solving the problem!
Therefore I took another glimpse to the output I got from example above, and indeed there is a new property there, it is not a message id, but simply the id (very clear, isnt' it ;-)).
However we still miss the path, but what a heck, we might simply try to search all the ~/Library/Mail folders after this ID. Maybe I find some good use for this spothlight after all ;
Let me check my script and maybe I can fix it right away, then I will post the completed one. BTW if you have already some search code snippet then post it..
Tx Zsolt
Use iCal to set a response reminder for a Mail message
Ok got this so far, but if the mail is moved it will not be found again as it gets a different number..
One way around this could be to move the mail into a special reminder mailbox first
with the script.
---
Use iCal to set a response reminder for a Mail message
This seems to work, I created a mailbox called 'reminders' for the messages to be either
moved or duplicated to. The script shows how to get the url for the email , which can then be place in the url of the iCal event. I will post an updated version of the full script later with this included. ( i need to go to bed)
---
Use iCal to set a response reminder for a Mail message
Hi Mark, this is starting to be interesting :-))
But is widening the discussion too, so let me know if you start to get bored, either/or prefer that we disccuss this directly in private mails and post only the results to forum...
The URL thing is very cool, I overlooked this too, and it does solve the problem I hit yesterday, but cuts the functionality, but let me go one by one.
Your approach with URL solves my latest problem and this is how to open this damn emlx file. Finder does not want to open it (or I'm doing something wrong), mail and message viewer do open it but show only an empty vidow with a b..it note that the message was not downloaded from the server...
just try to add
at the last line of your example code and you will see what do I mean.
I went then into automator which opens it too but then we are getting tangled in AS - Automator calls and this does not go smoot either, so we better skip it. Why is this so complicated when a simple double click from finder works, I have no idea....
But with URL approach you miss one functionality I implemented and this is updates. When I have an update to the event, like they guy replied that he will answer in 3 days, then I write an update into the ical event, postpone it for 3 days, and in the update I write a new id with which I can open the refering email message. With the URL approach I could add the URL to the even text, but first the URL is long, second it will not work with a click. I could replace the original URL but the I would lose the reference to the first email...
Also, there is one big difference between yours and mine, you search for the path at the moment of creation of the event, and I want to log only the ID and search for it at the moment of opening the emlx file, which overcomes the reminder mailbox problem.
So now we can go two ways, one is yours, URL in event, no additional links to update emails, this makes the script much simpler, or mine but then we should figure out how to open an emlx file from applescript.
As I said let me know when you had enough. For me it is kind of a challenge and therefore fun, but maybe you or others simply want a working solution no matter how good it is.
BTW I have no idea why the mdfind takes so long, and maybe you can shorten it by using the -onlyin option.
Let me know,
Zsolt
Use iCal to set a response reminder for a Mail message
Hi
Use iCal to set a response reminder for a Mail message
It is not a problem to code it (I guess) but to make an appropriate dialog for selection, as the AS does not support radio buttons or checkmarks. This means you would need then two separate dialogs and that is not very ellegant, but again doable. Let us sort out the current problems and we might come back to this later on. Thanks for input.
Use iCal to set a response reminder for a Mail message
OK, I managed to put it together today, so you might have some fun over the weekend.
Notes: The search for the file is rather slow, I have no idea why is mdfind so slow on my machine considering it should search in index, but probably this can be fixed somehow, at the moment it takes on my machine about 5-10 seconds to find the file, and you will have absolutely no visual feedback that something is going on, unless you monitor your CPU or disk activity. A nice progress bar, or instant search would be nice. As I'm still wandering how to open an email file from AS, to give you a working code, the place where the files should open is just displaying a dialog with a file path. But as soon as you figure out how to open the file, just replace 3 lines of code and you are done. Here is the script, at the end I will paste the usage....
Usual disclamer apply!!!
Usage: Save the file in the "~/Library/Scripts/Mail Scripts", you can then invoke it thru the script menu. I named it MailCalV7___ctl-e.app, in Jaguar this would let you invoke it with ctrl-e in the Mail, in Tiger I'm not sure if this works. There are 3 ways to use it: - create event: this will find the unique ID of the selected mail message and create a new event in iCal taking the mail subject as the title of the event, and the current date and time as the date and time of the event, it will also add string "MMID" and the ID of the message in the Notes of the event, where the MMID stands for Mail Message ID. Then it will take you to the event so that you can modify the date time and add some more comments - get id: the idea is to get the ID of the selected message which is a followup to an already created event, copy it into the clipboard and take you to the iCal. Then you can find the event you want to update, select the notes and hit ctrl-v to paste the new MMID, then you can add comments as followup notes to the event - open message with ID: this is when you want to actually see the content of the mail message you are referring to in the even notes. You check in the event which MMID you want to see, then start this script, select the option to open a message with ID, enter the ID manually, (sorry for bullets, I dont' know of any other way to enter text) and once you hit OK the mail message should appear. At this moment this will just show a dialog with a message path. Have fun, Zsolt
Use iCal to set a response reminder for a Mail message
To avoid the delay caused by shell script mdfind, I found the following script much faster in producing a URL of the selected mail message, identified as variable theURL, to hand off to iCal.
Use iCal to set a response reminder for a Mail message
I do not seem to have any delay on my Mac using the mdfind, but i will try you script out,, cheers
also here is a way to jump to the event of the selected email. that zmagyar was
but using these bits the script will now make the event reminder with a working I will write it up soon, as I am sure others will, to their preferred version.
--- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|