Replacing in TextEdit
Replacing in TextEdit
- Subject: Replacing in TextEdit
- From: "Vince E." <email@hidden>
- Date: Sat, 25 Sep 2004 11:16:02 +0200
How do you replace in TextEdit?
replacing words,character, paragraphs is easy!
just type:
tell application "TextEdit"
tell text of document 1
set every word where it is "test" to "works" --or:
set every character where it is "a" to "b" --or:
set every paragraph where it is "this is just a test text
" to "works"
end tell
end tell
That's easy! - But what if the piece of text you are going to replace
is neither a word nor a character or a paragraph?
What if it is a part of a word like the 'bag' of 'handbag' you want to
change into 'foot'? - just for example!
I want the user to be able to type any text into a text field he/she
wants to be replaced
so I need a more general specification than word, character or
paragraph but I just don't know how to name it
Thanx Vince
_______________________________________________
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