Re: make command
Re: make command
- Subject: Re: make command
- From: Jolly Roger <email@hidden>
- Date: Thu, 31 May 2001 14:18:01 -0500
- Replyto: email@hidden
On 5/31/2001 9:03 AM, "Destrebecq, Olivier" <email@hidden> wrote:
>
i need to create a file to output some data. Everything is fine if the file
>
i want already exist, but this is not the case this time. so i guess i need
>
to use make new document, but how do i pass it the file name and the place
>
where i want it in the file hierarchy?
How you construct the make command for your particular situation depends
largely on what application you are using to "make" the file. The syntax
from application to application can vary.
I suspect you are not telling an application, but are instead wanting to
create the file in plain vanilla AppleScript, in which case you should
probably not use the make command. Am I correct?
If so, you'll want to use the Standard Additions scripting addition to
create/write to the file. I would suggest using the "open for access
<alias> with write permission" command, which will automatically create the
file if it does not exist.
Here's the relevant info from the Standard Additions dictionary:
open for access : Open a disk file for the read and write commands
open for access alias -- the file to open for access. If this is a
file specification of a file that does not exist, a new file is created.
[write permission boolean] -- whether to allow writing to the file.
Result : small integer -- a file reference number; use for read9,
write9, and close access9
Just in case you don't know yet: To view a scripting addition or application
dictionary, just drag the scripting addition or application icon over your
script editor.
HTH
JR