This method:
set a to ((path to shared documents as Unicode text) & "Mailfiles:")
uses a nice system on the Mac to automatically get the path to the Shared folder, regardless of the drive name or the user name. It makes it very easy to write code that will work properly on any machine. There are only a limited number of [path to] options, like path to documents folder, path to desktop, path to music folder, etc. You will find a good list in the Applescript dictionary for Standard Additions, under the heading File Commands.
If you have other places you want to save attachments, like external drives or folders not on the [path to] list, you will need to set the path variable yourself, like this:
set a to "Macintosh HD:Users:Fredrik:Hotfolder:"
set a to "External HD:Automator:Dropfolder:"
When you do it this way, you MUST have the pathway written correctly, so it would be a good idea to test it out first. Also, be sure to put the colon [:] at the end, so that when you add on the filename, it will be correctly written to the desired folder.
If you are having troubles, be sure to come back here for assistance. There are many scripters that check in to help people learn, and that is why they come, so do not be shy about asking, just be polite, and thank those that assist you.
Jag kan se dig pÄ stranden, Àr du inte kalt? Du behöver en jacka, kanske tvÄ. HÀr Àr mitt hus-1306 163rd st east, tacoma, wa, usa 98445. Vi bÄr nÀsta skolan, mina barn har en liten swimmingpool i trÀder. Huset Àr i skuggor. Finns det svenska ord för download?