• 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: AppleScript-Users Digest, Vol 4, Issue 264
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 4, Issue 264


  • Subject: Re: AppleScript-Users Digest, Vol 4, Issue 264
  • From: has <email@hidden>
  • Date: Tue, 5 Jun 2007 20:28:17 +0100

Nigel Redmon wrote:

I'm writing a scripting addition.
[...]
Now I'm
trying to go the other way, with a command that accepts data and a
reference to a file that does not yet exist; the command will create
the new file, write the data in the appropriate format, and close the
file. I would expect this file name to come from the user selecting a
file in the standard Mac directory dialog.

This thread really belongs on the applescript-implementors list, but anyway...


When extracting the 'file reference' parameter from the incoming Apple event, specify typeFileURL as the desired type in your AEGetParamDesc call. (Don't use typeFSS as it's obsolete.) The resulting AEDesc's data handle will contain a 'file:' URL string which you can (e.g.) convert to a CFURL via CFURLCreateWithBytes.

HTH

has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: [ANN] Script Timer 2.5 released by Apps & More Software Design
  • Next by Date: Re: Searching a Mail message
  • Previous by thread: Re: [ANN] Script Timer 2.5 released by Apps & More Software Design
  • Next by thread: Scripting Pages Mail Merge
  • Index(es):
    • Date
    • Thread