Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.