Re: error 10
Re: error 10
- Subject: Re: error 10
- From: John Delacour <email@hidden>
- Date: Sun, 31 Aug 2003 20:06:11 +0100
- Mac-eudora-version: 6.1a1
At 9:59 am -0700 31/8/03, Paul Berkowitz wrote:
I'm glad that 'file' will now always work again to create new files. But
that's not an option in apps which have their own 'file' implementation such
as Entourage, which override the system's 'file' when within an app's tell
block, To 'save' anything, you have to be in the app's tell block, so saving
in 'file' has never worked for those apps, but saving in string or Unicode
text always has.
I don't see what the problem is. You don't have to say 'file
"pathstring"', which is the thing that causes problems in Entourage
or Eudora. You can build a file specification within the tell block
or outside it with no problems.
Whichever way I turn things, I cannot see the difficulty you are
talking about. To say 'file "pathstring"' in Eudora is just plain
nonsense, since file is a property of certain Eudora classes whose
value happens to be a file specification. And the same is true of
Entourage except that its value is an alias. In Eudora and
Entourage, the only proper use of 'file' is in expressions such as
'file of mailbox 1', 'file of nickname file 0' etc.
set _posixpath to "/tmp/f"
set _posixfile to _posixpath as POSIX file
set _pathstring to _posixfile as Unicode text
set _filespec to _pathstring as file specification
tell application "Microsoft Entourage"
set _message to first item in (get selection)
set _refnum to open for access _pathstring as file specification
with write permission
set eof _refnum to 0
close access _refnum
save _message in _filespec -- 1
save _message in (_pathstring as file specification) --2
set f to _pathstring as file specification
save _message in f --3
end tell
do shell script "more " & _posixpath
JD
.
_______________________________________________
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: error 10 (From: Paul Berkowitz <email@hidden>) |