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



On Jul 31, 2006, at 3:52 PM, Dan Doughtie wrote:


tell application "Finder" 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 end tell

Open for access through close access should be outside the tell block.

For that matter, you don't need the tell block at all.

set MyFile to (choose file name default location (path to desktop) default name "DoStoryName(winningTeam)")
set theFile to open for access MyFile with write permission
write AGATE to theFile starting at eof
close access theFile


If you want it always at the desktop, you can hard code that instead of using "choose file name"

-- Michelle

--
My choice early in life was either to be a piano-player in a whorehouse or a politician. And to tell the truth, there's hardly any difference.
-- Harry S. Truman (circa 1962)


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