Need help, please: duplicate file name
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.