• 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: Saving a TextEdit document using AS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving a TextEdit document using AS


  • Subject: Re: Saving a TextEdit document using AS
  • From: Tom Robinson <email@hidden>
  • Date: Sun, 17 Jul 2005 11:58:21 +1200

On 2005-07-13, at 16:46 , Kumar Shailove wrote:

I am typing characters of different languages in a TextEdit document,
and then saving using AppleScript.

tell application "TextEdit"
        save document 1 in <filepath>
end tell

I suspect when you save manually you're using a format which supports different languages, such as Unicode UTF-8 or Unicode UTF-16; conversely, when saving using AppleScript you're only using a basic script such as MacRoman.


TextWrangler can tell you what format the document's saved in, as will hex dumping the first few bytes of the file.

As to how to script it, there doesn't seem to be anything in the dictionary.

If you're only writing plain text, you could do it straight from AppleScript...
_______________________________________________
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
References: 
 >Saving a TextEdit document using AS (From: "Kumar Shailove" <email@hidden>)

  • Prev by Date: Re: General question about what is possible re: AS driving JavaScript
  • Next by Date: Mail and Safari's Cmd + and Cmd -
  • Previous by thread: Saving a TextEdit document using AS
  • Next by thread: Re: Scripting mail create a mailbox in a mailbox (folder)
  • Index(es):
    • Date
    • Thread