• 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: Make command with file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make command with file


  • Subject: Re: Make command with file
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 01 Jun 2001 08:41:13 +1000

On 1/6/01 1:45 AM +1000, Destrebecq, Olivier, email@hidden, wrote:

> ok i manage to create a file, but i want to create it in the Temporary item
> folder
> this works
>
> tell application "Finder" set BootVol to name of startup disk set
TmpItems to
> BootVol & ":Temporary Items:" as text make file at startup disk with
> properties {name:"result"}end tell
>
> but this fail
> tell application "Finder" set BootVol to name of startup disk set
TmpItems to
> BootVol & ":Temporary Items:" as text make file at folder TmpItems with
> properties {name:"result"} set test to 1end tell
>
> the set test to 1 line is not even executed
> the make command seems to crash
>
> I'm running 9.1, but the solution should work from 7.5.5 to 9.1 if possible

I think this is close to what you want:

set tempPath to (path to temporary items) as text
set fileRef to (open for access file (tempPath & "result") with write
permission)
write "1" to fileRef
close access fileRef

--
Shane Stanley, email@hidden


  • Prev by Date: password and SSL problems with URL Access 2.2.1
  • Next by Date: Run applet from browser
  • Previous by thread: password and SSL problems with URL Access 2.2.1
  • Next by thread: Run applet from browser
  • Index(es):
    • Date
    • Thread