Re: Writing To A File
Re: Writing To A File
- Subject: Re: Writing To A File
- From: Steve Mills <email@hidden>
- Date: Tue, 30 Sep 2003 11:48:40 -0500
On Tuesday, Sep 30, 2003, at 10:42 US/Central, Paul Skinner wrote:
almost every other app or command I regularly use that takes a file
reference works no matter what when I pass a pathname string instead
of a file or alias.
Even the Std. Additions ones?
Yup, some of them:
Does Type in dictionary
-------------------------------------
list folder file
store script file
saving to parm of say anything
Doesn't:
info for anything
load script alias
Clearly, if the documented type is "anything", that makes it look like
it really should take a string, but it doesn't in the case of "info
for".
Even the Finder takes pathname strings in some cases:
tell application "Finder"
reveal "Gort:Applications:"
end tell
If it can be supported in the cases listed above, it should be
supported in all cases. MultiAd Creator accepts pathname strings
*everywhere* a file reference is accepted, as well as typeFSS, and for
existing files typeAlias, typeFSRef, and I even noticed a couple places
that accept a Finder "file" object specifier (must've been added as a
special case).
Doing so takes the headaches out of script writing, like the case where
"open for access" accepts a string if the file does NOT exist, but
returns an error if it already exists. That's just wanky.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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.