• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using the document element in TextEdit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Script application "bundles" that are read-only: error when quitting
  • Next by Date: name of file
  • Previous by thread: Re: Using the document element in TextEdit
  • Next by thread: Script error in applications Script Menu
  • Index(es):
    • Date
    • Thread