Creating an afp file

This is driving me mad and I am hoping there is a simple solution. I am in need of a way to script the creation of an .afploc file. Basically the equivalent pasting “afp://user:pwd@” into a Safari browser and then dragging that link to the desktop. I don’t wish to simply connect to a server, I want to actually create a file, that when double clicked, will connect to the server.



do you mean

tell application "Finder" to make new internet location file to "afp://user:pwd@" at desktop with properties {name:"myAFPLoc"}

Yes! I think this may do the trick. Thanks.