• 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
Need help, please: duplicate file name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help, please: duplicate file name


  • Subject: Need help, please: duplicate file name
  • From: Jan Erik Moström <email@hidden>
  • Date: Sat, 23 Mar 2002 10:13:13 +0100

Since moving to OS X I have some serious problems with "open for access", I'm
probabably making some simple mistake but I can't figure out what. I
typically do

set fr to open for access (file theFile) without write permission

and get a "Duplicate file name" error message when I try to run the script
... but why. Here is an example

on prepareMeshfile(rootName)
tell application "Finder"
set theFile to destDirectory & rootName & ".temp"
if file theFile exists then
set fr to open for access (file theFile) without write permission
set tmp to read fr
close access fr
set mf to open for access file (destDirectory & rootName &
".mesh") with write permission
write tmp to mf
return mf
else
display dialog "Oppps, kunde inte hitta " & theFile
end if
end tell
end prepareMeshfile

When I come to the first open for access then I get the error message (I've
tried without 'file' and with 'alias' but the result is the same).

What am I missing?


jem
--
Jan Erik Mostrvm email@hidden www.mostrom.pp.se
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: what is the best way to 'unset' a variable
  • Next by Date: Re: Need help, please: duplicate file name
  • Previous by thread: Re: [OS X]getting email addresses with AppleScript
  • Next by thread: Re: Need help, please: duplicate file name
  • Index(es):
    • Date
    • Thread