I’ve prepared a stripped down version of a longish script to show the problem - this runs under OS9, but gives a file permission error in OSX. All my scripting so far has been OS9, and I usually grab bits from earlier scripts without much understanding! I suspect something has changed, and I should probably stick the words ‘as alias’ in somewhere…
Here’s the script (which just writes a few words to a file):
set FileList to {“one”, “two”, “three”}
copy (choose file name) as string to dataFile
open for access file (dataFile) with write permission
tell application “Finder”
repeat with theFile in FileList
write (theFile) & return to file (dataFile) starting at eof
end repeat
end tell
close access file (dataFile)
Works in OS9. Fails in OSX. Suggestions? - TIA!