Re: TextEdit.app
Re: TextEdit.app
- Subject: Re: TextEdit.app
- From: Emmanuel <email@hidden>
- Date: Tue, 1 Jul 2003 21:50:36 +0200
At 12:48 PM +0100 01/07/03, John Woodrow wrote:
>
Inspired by recent threads on 'Remove spaces' and on 'Scriptable Text Editor for OSX', I started playing around with TextEdit.app. and was taken aback both by the (small) size of its dictionary, and by not being able to find much help on the web.
>
>
With trial and error, I came up with this script which does a global find and replace, preserving styled text, and which is offered as a small step to help remedy the above.
It is your choice to work with Text Editor, this may be a good idea for many reasons.
However we cannot totally discard Smile (a script editor that is free *and* a scriptable text editor, that is free also!) as a better candidate to perform such kind of text processing. Furthermore, by chance Smile's windows support styled text and by chance Smile's "change" and "find text" work in text windows and preserve styled text [1].
For instance, in Smile, you would do:
----------------------------------
change searchString into replaceString in window "my document"
----------------------------------
Emmanuel
PS
I wrote a long mail a few hours ago, apologies, it's horribly full of typos. Don't write mail in the noise.
[1] Note however that if the text is long, speed will be a problem. For long strings, do work on - monostyled - strings:
----------------------------------
set text of theWind to (change searchStr into replaceStr in (get text of theWind))
----------------------------------
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >TextEdit.app (From: John Woodrow <email@hidden>) |