Ericlm
Ericlm

Reputation: 147

AppleScript - make new document at location

I'm trying to create a Numbers' document and then export it to pdf, but my main issue is that the document is created in iCloud and I cannot delete it. To make this new document at a custom location, I'm using make new document at, but I can't get the location specifier correct. I tried to use a path:

set downloads to path to downloads folder

But I get an error, "can't make alias "path" to type location specifier". And if I try this:

set myDocument to make new document at end of downloads

I get another error Can't obtain alias "Users:username:Downloads"

I don't understand how I can simply create my document at a specific location...

Upvotes: 0

Views: 243

Answers (1)

matt
matt

Reputation: 536027

You're mixing apples with oranges. The "location" here is merely the front-to-back position among other similar entities, such as documents / windows. You specify the path on disk when you save the document in a later step.

Upvotes: 1

Related Questions