tell application "xxxxx" to open "nnnnn" : from iCloud?

Quite simply, I’d like to open a numbers document that’s stored in iCloud.

I am aware that the document is stored locally, but I’m sure that’s not how it should be done


How would you open a document that’s stored in iCloud?

tell application "Numbers" to open "a document.numbers"

doesn’t seem to cut the mustard…

This draft may help.

set p2Cloud to (path to library folder from user domain as text) & "Mobile Documents:com~apple~"
set docName to "kloud.numbers"
tell application "Numbers"
	set theApp to its name
	open file (p2Cloud & theApp & ":Documents:" & docName)
end tell

Yvan KOENIG (VALLAURIS, France) mercredi 19 février 2014 15:18:43

Works perfectly, Yvan, but would be nice to be able to reference a document directly in iCloud!

Many thanks!

When we want to open a document, we must give its full pathname.
I don’t see any kind of difference with a document stored in the Cloud.

maybe one day iPlay will offer a parameter allowing us to use
open file xxx.numbers from iCloud
but I really doubt of that.
I gave the pathname for a file stored at the root of iCloud storage.
What if it’s stored in a folder created in the Cloud.
I don’t know if such folders exist at this time but they will necessarily exist one day if we don’t want to store documents in an awful mess.

Yvan KOENIG (VALLAURIS, France) mercredi 19 février 2014 16:22:49

I quite agree (with everything!)