Le 14/01/2013 à 02:46, James Roberts < email@hidden> a écrit : Merci Yvan,
That stabilized the run time to about 5 sec. It still hangs Mail’s GUI but only long enough to be annoying not unworkable :-) Can you explain what is happening with calling the script with ‘run’. I noticed the script dose not appear as it’s own process now, just mail cpu jumps to 100%.
Hello
I don't know the technical explanation but when scripts are saved as applications, they behave slower than when they are saved as scripts. I learnt the tip ”encapsulate them in a script wraper“ one or two years ago. It's really efficient and I use it for all my scripts.
It's just annoying during the coding phase because what is done in the script object doesn't appear in the Event log. This is why I insert the script wraper only when the code is OK.
Back to your script.
From my point of view, it's odd to scan every messages every minute. I feel that it would be more efficient to use a rule storing flagged messages in a dedicated mailbox. So your script would just have to treat the contents of this box.
Yvan KOENIG (VALLAURIS, France) lundi 14 janvier 2013 10:17:04
|