• 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: Formating TextEdit documents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Formating TextEdit documents


  • Subject: Re: Formating TextEdit documents
  • From: Bill Briggs <email@hidden>
  • Date: Sun, 3 May 2009 00:53:13 -0300

Title: Re: Formating TextEdit documents
At 9:57 PM -0600 4/30/09, Sutapalli Satyanarayana wrote:
Content-Type: text/html; charset=UTF-8
Content-Description: HTML
I worte a apple script that will open Dictionary and using "keystroke" I will enter some text and copy the text to clipboard.
Then I will create a new document in TextEdit  and using "keystroke" (v & command down), I will paste the clipboard contents to textedit document and save it on desktop as "meaning.rtf". The whole porcess is working fine.

Now, I want to format the document like
1.  Set the "Normal" paragraph style to Left aligned + Euclid 12 point bold + keep lines together.
2.  For each line that begins with the string "ORIGIN", set the paragraph style to "Origin".  This paragraph style should be Normal + 12-point line spacing above + keep lines together.
3.  Eliminate all lines beginning with the string "   [1913".  (some definitions have this)

and many more like these.

One way is before pasting the clipboard, format the text and then paste it to textedit document.
Other way is after saving the document, re-open it and format.

Which way I can achieve this task. What commands in Apple script I have to use for formating text.

I googled a lot and couldn't find something relevant for my task.

 I'm not surprised.

 First, TextEdit doesn't support a style catalogue, so having a "normal" paragraph style that you could apply, as you might see in Word, is not something you get in TextEdit. It has basic, menu-selected formatting, so it's all manual. (Yes, you can script it, but it's not like you might want it to be.) If you want to apply preset styles, you're not using the right tool. There is a long discussion around what tool might be useful for you (and not knowing your situation, it's difficult to speculate), but TextEdit is not likely the thing you need. Nor is Word. The sad fact is, your options are limited unless you are prepared to spend significant dollars.

 If you are going to script styled text on the cheap, you will be happier using Tex-Edit plus. Scripting in this application is a pleasant experience. Scripting in TextEdit, by comparison, is not.

 If you want an application that has pre-defined paragraph styles that you can apply via scripting, then there are no clear winners. It's an unhappy lot you have to choose from, either because of expense, bugs, or lack of good scripting support.

 If I were doing the task you describe, I'd use FrameMaker. But the demise of the Mac version of FrameMaker is yet another sad tale. We have 35,000 iPhone applications, but lost the preeminent tech writing tool on the Mac platform. So much for my loathing of Adobe.

 - web
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: MacSX 10.5.6, Opening the sidebar in Preview
  • Next by Date: test
  • Previous by thread: MacSX 10.5.6, Opening the sidebar in Preview
  • Next by thread: test
  • Index(es):
    • Date
    • Thread