Я хочу, чтобы очистить текст от текста TextEdit но только половина работает для менякомпании Apple Script: Очистка TextEdit текст
tell application "TextEdit"
set documentText to text of document 1
set {oldTID, my text item delimiters} to {my text item delimiters, "Administration"}
set textBits to text items of documentText
set my text item delimiters to ""
set text of document 1 to textBits as text
set my text item delimiters to oldTID
set documentText to text of document 1
set {oldTID, my text item delimiters} to {my text item delimiters, "New Search"}
set textBits to text items of documentText
set my text item delimiters to ""
set text of document 1 to textBits as text
set my text item delimiters to oldTID
set documentText to text of document 1
set {oldTID, my text item delimiters} to {my text item delimiters, "Advanced"}
set textBits to text items of documentText
set my text item delimiters to ""
set text of document 1 to textBits as text
set my text item delimiters to oldTID
set documentText to text of document 1
set {oldTID, my text item delimiters} to {my text item delimiters, "Tips"}
set textBits to text items of documentText
set my text item delimiters to ""
set text of document 1 to textBits as text
set my text item delimiters to oldTID
end tell
По какой-то причине «Новый поиск» по-прежнему в текстовом документе. Возможно ли в противном случае сохранить текст только от строки 2 до 3?
С уважением.
Это прекрасно работает, также мир должен быть в том же порядке в скрипте, что и в текстовых файлах. Спасибо ! –
Добро пожаловать. Хорошего дня. –