Re: Oh-oh, another victim to scripting Mail (how do I restart Mail with AS?)...
Re: Oh-oh, another victim to scripting Mail (how do I restart Mail with AS?)...
- Subject: Re: Oh-oh, another victim to scripting Mail (how do I restart Mail with AS?)...
- From: Emmanuel <email@hidden>
- Date: Sat, 21 Jun 2003 11:45:45 +0200
At 3:55 PM -0700 20/06/03, Dave Stewart wrote:
>
tell application "Mail"
>
quit
>
end tell
>
>
delay 10
>
>
tell application "Mail"
>
activate
>
check for new mail
>
end tell
As I see it, "delay" is the kind of command that hangs things a bit. So, I would try two things.
1. Since you're in Smile, try replacing "delay 10" with "smilepause 10" (or less than 10). In fact this will mimic quite closely what you're doing when you run in two successive operations.
2. Suppose the System is slow at realizing that some process has quit. We should help it update. I would suggest trying to tell Finder to update the application's file, and I would suggest trying to get the processes with "ps". If you're not too familiar with the shell commands, do download Shelp, it helps much:
<
http://www.satimage.fr/software/downloads/Shelp.sit> (small KB).
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.