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: Problem with simple finder script- make new file, open for access



At 6:52 PM -0400 7/31/06, Dan Doughtie wrote:
    set MyFile to make new file at desktop with properties
{name:DoStoryName(winningTeam) of me}
    open for access file MyFile with write permission
    write AGATE to file MyFile starting at eof
    close access file MyFile
[...]
Is this related to a desktop reference bug?

Sorry to tell you so, Dan, but unless I'm missing something your syntax was flawed in the first place, it's just that AppleScript is getting more strict.


MyFile is a reference to a file, under a form which is specific to Finder.

You can coerce it into a type that other commands, such as "open for access" (which does not belong to Finder, as Michelle told you), will be able to use: that's with "as":

set aCorrectAlias to MyFile as alias

(you can also do: MyFile as file specification, but don't do it)

But "file MyFile" is officially not a way of making the Finder's descriptor into a file specification. We can only be sorry that it looked like it worked so far.

Emmanuel
_______________________________________________
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

This email sent to email@hidden
References: 
 >Problem with simple finder script- make new file, open for access (From: Dan Doughtie <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.