Error -1728 | choking on 'file specification | network user issues?

see my previous post for an explanation of what this script does - http://macscripter.net/viewtopic.php?id=32968

So here’s the deal - this script works fine on my Macbook running 10.5.8, with me logged in as the admin user. But it won’t run on the computer I wrote it for (Mac Mini running 10.6) with the user logged in as a network user. It chokes on the “as file specification” line and gives me error -1728.

Obviously the scripting environment has changed between 10.5 and 10.6 - is there something I need to do to make this script 10.6-happy?

Or is this a permissions problem caused by the fact that the home folder is on a network volume?

--I grabbed the playlist text from the NMT's own playlist file; not sure what the extra parameters mean. Probably fade & duration & such. For now I'm just copying it blindly.
set theString to "|file:///opt/sybhttpd/localhost.drives/USB_DRIVE_DSS/dss/media/"
set thePlaylist to ""
set myImages to (choose file with prompt "Choose one or more media files" with multiple selections allowed)
repeat with e in myImages
	set theName to name of (info for e)
	set thePlaylist to thePlaylist & "5|4|" & theName & theString & theName & "|" & return
end repeat
--make a blank playlist file if needed
if not (exists file "pls.dss" of documents folder) then
	do shell script "touch ~/Documents/pls.dss"
end if
set theFile to (((path to documents folder) as string) & "pls.dss") as file specification
try
	close access theFile
end try

open for access theFile with write permission
if button returned of (display dialog "Do you want to append these files to the existing playlist, or create a new playlist?" buttons {"Append", "Create New"} default button 1) = "Create New" then
	set eof of theFile to 0
end if
write (thePlaylist) to theFile starting at eof
close access theFile

--upload the images to the image directory
--don't forget to edit the username, password, and IP address/url of your NMT
repeat with p in myImages
	do shell script "curl -T " & quoted form of (POSIX path of p) & " -u username:password ftp://IP-address-of-my-NMT/dss/media/" & quoted form of (name of (info for p))
end repeat
--upload the playlist file
do shell script "curl -T ~/Documents/pls.dss -u username:password ftp://IP-address-of-my-NMT/dss/config/pls.dss"

Model: MacBook 13"
AppleScript: 2.2.1
Browser: Google Chrome
Operating System: Mac OS X (10.5)

Hello

Did you install the XMLLib.osax on the machine you run the script from ?
It’s the one that has file specification in its library.

Best Regards

McUsr

I finally got it to work by changing ‘file specification’ to ‘alias’.

The functional distinctions between alias/path/file spec/reference have never been clear to me, so I usually wind up trying them all until something works. I know what they ‘mean’ (mostly), but I don’t get why sometimes you need one and sometimes another. If someone could enlighten me I’d be most obliged …