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.
--Satyam.
|