-1

is it possible to have a script (AppleScript & JavaScript) Library stored on a shared iCloud Drive folder? I'm relatively novice to coding (maybe a little over a year) and I can't make sense of this snippet:

Any folders specified in the environment variable OSA_LIBRARY_PATH. This allows using a library without installing it in one of the usual locations. The value of this variable is a colon-separated list of paths, such as /opt/local/Script Libraries:/usr/local/Script Libraries. Unlike the other library locations, paths specified in OSA_LIBRARY_PATH are used exactly as-is, without appending “Script Libraries”. Supported in OS X v10.11 and later.

or...

The network Library folder, /Network/Library. Libraries located here are available to multiple computers on a network.

from this article Script Libraries

I have it working perfectly from my /Users/username/Library/Script Libraries

but ive rallied in my neighbor to the project. He has access to my wifi, so a network drive would be okay. However, storing it in a shared folder in iCloud would be ideal.

There's also this link OSA_LIBRARY_PATH but im having trouble translating it to iCloud. Hopefully someone can spell it all out for me...

Thanks in advance!

timbot
  • 5
  • 5

1 Answers1

0

The Script Libraries are document files. iCloud service supports working with Documents folder.

So, first, add (activate) at least one iCloud account in the Internet Accounts pane of System Preferences.

Then double-click on icon of this account. Will appear litte button ("Options..."). Set the checkbox for "Desktop & Documents folders".

Now close System Preferences, go --> HOME --> LIBRARY --> MOBILE DOCUMENTS. Create at this location new folder named "Script Libraries" and move your script libraries to it.

Now, you have custom "Script Libraries" folder on the iCloud storage. OSA_LIBRARY_PATH for your "Script Libraries" you can get programatically:

POSIX path of (path to library folder from user domain) & "Mobile Documents/Script Libraries/"
Robert Kniazidis
  • 1,760
  • 1
  • 7
  • 8