Re: Reading a file in the user's home Documents
Re: Reading a file in the user's home Documents
- Subject: Re: Reading a file in the user's home Documents
- From: Walter Ian Kaye <email@hidden>
- Date: Thu, 11 Sep 2003 19:14:06 -0700
At 05:25p -0700 09/11/2003, Dave Stewart didst inscribe upon an
electronic papyrus:
After a half an hour trying to figure out the syntax of:
set theUserCodePath to (((path to current user folder) as text) &
"Documents:updateScriptKey" as POSIX file)
so I can
set theFileToRead to open for access theUserCodePath
I give up. I've tried the ASLG (slower than molasses today), the
archives for this list (also slow and having lots of stuff that's
similar but obviously not close enough ... otherwise I'd have solved
this already!!!!) and a few tutorials I've found in books. Every
attempt at the first line gives me some form of error or the other
(what's listed above yields "Bad name for file. file
:.:<path_that_I_want>")
Why are you using 'as POSIX file'? That is your problem -- you are
mixing apples and oranges, or ":" paths with "/" paths.
The pathname separator in AppleScript is a colon. You only need the
POSIX file if you are talking to the UNIX shell or to a wacked-out,
recompiled-from-NeXT Cocoa app. (And even then, you need to make sure
all sides of a concatenation are of the same form.)
HTH,
-Walter
_______________________________________________
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.