Re: Properties not saved when a script is executed by a Mail rule?
Re: Properties not saved when a script is executed by a Mail rule?
- Subject: Re: Properties not saved when a script is executed by a Mail rule?
- From: "S. J. Cunningham" <email@hidden>
- Date: Fri, 20 Mar 2015 20:52:56 -0400
On Mar 20, 2015, at 7:28 PM, Shane Stanley wrote:
> On 20 Mar 2015, at 9:45 am, Shane Stanley <email@hidden> wrote:
>>
>> On 20 Mar 2015, at 7:05 am, S. J. Cunningham <email@hidden> wrote:
>>>
>>> The property isn't sticking.
>>>
>>> Can someone explain what is going on and how to fix it? Is Mail recompiling the script every time it is called?
>>
>> When an application finishes running a script, it's supposed to check whether there have been any changes made, and if so, save the modified version. If that's not happening, possible causes include things like permissions issues, or whoever wrote the application simply didn't implement this step.
>
> Now that I think about it more, it sounds like a sandboxing issue. Sandboxed applications can only run scripts stored in a specific folder, and I have a feeling they only have read-access to that folder -- which means they can't write back modified scripts. That doesn't mean the background process that really runs them in such cases can't -- it might be able to -- but it suggests the problem applies across the board to scripts run from sandboxed apps.
I'm using Snow Leopard. I don't think they had implemented sandboxing at that point. Plus the rules allow you to specify a script in any folder, not just Mail's script folder. The script in question is in a development folder I use. When I run the script manually or save it as a script app and run it, it works as expected. It's only when it's called by the Mail rule that it fails.
I also copied it to both BBEdit's Script Folder and Mail's script folder and executed the copy directly from there. Works as expected. It's only when it's executed as a result of a Mail Rule that is fails. Must be a Mail bug. Perhaps it makes a copy of the script each time before executing it. I Binged it but couldn't find anything.
_______________________________________________
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