Re: Rebooting a Mac with a Mail Rule
Re: Rebooting a Mac with a Mail Rule
- Subject: Re: Rebooting a Mac with a Mail Rule
- From: debt <email@hidden>
- Date: Wed, 15 Mar 2017 11:42:06 -0700
> On Mar 15, 2017, at 10:22 AM, Stockly, Ed <email@hidden> wrote:
>
> Use a property to store the time of the reboot then test
Thanks, Ed, but unfortunately that didn’t help. I wouldn’t think that variables were persistent across reboots, but it was worth a try.
The AppleScript Mail rule works fine when manually triggered, i.e. when I select the email and choose Apply Rules to it. It’s only when Mail checks for new mail on it’s own that I get the loop.
----------
O.K. I found the problem. I had saved the AppleScript an an application. “Stay Open” was *not* selected. I still don’t know why, but using an app somehow caused the loop. Once I placed the code directly in the Mail rule, everything worked as it should. My mistake. I thought it needed to be saved as an app.
Just out of curiosity, does Mail wait for an AppleScript/shell script to finish before it lets go of the rule? Or does it just set the wheels in motion and then get out of the way? It seems like it’s the former. If so, that could be part of the problem.
Marc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden