Re: Using the document element in TextEdit
Re: Using the document element in TextEdit
- Subject: Re: Using the document element in TextEdit
- From: Emile Schwarz <email@hidden>
- Date: Mon, 18 Jul 2005 09:07:23 +0200
Hi David,
> I'm surprised it even lets you set the path property, but
> my guess is that doing so only affects subsequent Save commands.
This is the answer that I wanted to get (I think), but I was tired at the time
(probably) and stop one the question arise :(
I will investigate that later today,
Thanks,
Emile
email@hidden wrote:
From: David Durkee <email@hidden>
Subject: Re: Using the document element in TextEdit
To: AppleScript Users List <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Try this:
tell application "TextEdit"
-- push the TextEdit application to the front
activate
-- let the user select a rtf file from disk
set zeFile to choose file of type {"public.rtf"}
open zeFile
set doc to document 1
-- get the document properties
return properties of doc
end tell
You generally can't open a file by setting a document's path
property. I'm surprised it even lets you set the path property, but
my guess is that doing so only affects subsequent Save commands. To
open a file in just about any scriptable app, use the open command.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden