Re: saving mails...
Re: saving mails...
- Subject: Re: saving mails...
- From: Bob Stern via AppleScript-Users <email@hidden>
- Date: Thu, 21 May 2020 01:28:43 -0700
>> On May 20, 2020, at 00:19, Axel Lüttgens wrote:
>>
>> Here, under Mojave, Script Editor (or Terminal) needs to be given full disk
>> access for being able to return the file’s path. No need for "with
>> administrator privileges" (or sudo) then.
> On May 19, 2020, at 08:25, Jean-Christophe Helary wrote:
>
> Even with full disk access for Terminal Script Editor or Script Debugger I
> don't get anything on Catalina.
In some circumstances, the user has to manually open a folder to grant
permission for an application to subsequently access that folder. I wonder
whether “choose folder" would grant to the script the permission required for a
subsequent mdfind command.
If it works, perhaps declaring mailFolderChosen as a property would make the
permission persistent.
tell application "System Events" to set libraryFolder to POSIX path of library
folder
set mailFolderAlias to POSIX file (libraryFolder & "/Mail/V7/") as alias
set mailFolderChosen to choose folder default location mailFolderAlias
Bob
_______________________________________________
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