• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: saving mails...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: saving mails... (From: Jean-Christophe Helary via AppleScript-Users <email@hidden>)
 >Re: saving mails... (From: Yvan KOENIG via AppleScript-Users <email@hidden>)
 >Re: saving mails... (From: Jean-Christophe Helary via AppleScript-Users <email@hidden>)
 >Re: saving mails... (From: Axel Lüttgens via AppleScript-Users <email@hidden>)
 >Re: saving mails... (From: Jean-Christophe Helary via AppleScript-Users <email@hidden>)

  • Prev by Date: Re: saving mails...
  • Next by Date: Re: saving mails...
  • Previous by thread: Re: saving mails...
  • Next by thread: Re: saving mails...
  • Index(es):
    • Date
    • Thread