• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Writing To A File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Writing To A File (From: Paul Skinner <email@hidden>)

  • Prev by Date: Re: Writing To A File
  • Next by Date: Re: Writing To A File
  • Previous by thread: Re: Writing To A File
  • Next by thread: Re: Writing To A File
  • Index(es):
    • Date
    • Thread