• 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: A folder for scripts to share
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A folder for scripts to share


  • Subject: Re: A folder for scripts to share
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 24 Apr 2016 11:26:15 +0200


Le 24 avr. 2016 à 04:27, Stockly, Ed <email@hidden> a écrit :

If a script tries to create a folder in application support the user is asked to authenticate.


On Apr 20, 2016, at 8:45am, Andrew Oliver <email@hidden> wrote:

Sounds like a perfect use case for:

path to application support

No?

Andrew

Sent from my iPhone

On Apr 20, 2016, at 8:22 AM, Stockly, Ed <email@hidden> wrote:

I have scripts that I’m going to install on users macs. Several of these scripts need to access (create/read/write) the same data stored in files.

In the past I’ve just included the data inside a script bundle, but since some of the scripts may be installed in protected folders (requiring authentication) this won’t work.

So my question is what’s the best practice for storing data on a user’s mac that multiple scripts will have access to, but won’t interfere with the user at all. In other words the user won’t see it unless he goes looks for it, but the scripts will always have read/write access.


Hello Ed.
You got that because you tried to create the folder in Application Support folder from the local  domain (/Library/Application Support/).

Is there a reason for not creating the folder in the Application Support folder from the user domain (/Users/userName/Library/Application Support/)?

I ran :

set p2Library to path to library folder from user domain as text
set p2ApplicationSupport to p2Library & "Application Support:"
tell application "System Events"
make new folder at end of folder p2ApplicationSupport with properties {name:"dropBox setting"}
end tell

and wasn't asked to authenticate.

I tried with :

set p2Library to path to library folder from user domain as text
set p2ApplicationSupport to p2Library & "Application Support:"
tell application "Finder"
make new folder at folder p2ApplicationSupport with properties {name:"dropBox setting"}
end tell

and it worked too without asking to authenticate.


Yvan KOENIG running El Capitan 10.11.4 in French (VALLAURIS, France) dimanche 24 avril 2016 11:19:16



 _______________________________________________
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

  • Follow-Ups:
    • Re: A folder for scripts to share
      • From: "Stockly, Ed" <email@hidden>
References: 
 >A folder for scripts to share (From: "Stockly, Ed" <email@hidden>)
 >Re: A folder for scripts to share (From: Andrew Oliver <email@hidden>)
 >Re: A folder for scripts to share (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Restore FastScripts Keyboard Shortcuts from Backup
  • Next by Date: Re: Acquiring the Dropbox Folder Path -- was: Re: Error -10000 for one user (Nigel Garvey)
  • Previous by thread: Re: A folder for scripts to share
  • Next by thread: Re: A folder for scripts to share
  • Index(es):
    • Date
    • Thread