Может кто-нибудь сказать мне, почему этот скрипт, работающий на наборе файлов в automator, оставляет все мои окна TextMate открытыми с приглашением сохранить, ожидая мой ввод вместо фактического сохранения и закрытия файла?
Я предполагал, что строка close window 1 saving yes
сохранит и закроет файл и перейдет к следующему, но, похоже, это не так.
on run {input, parameters}
repeat with a from 1 to length of input
tell application "TextMate"
activate
open item a of input
tell application "System Events"
tell process "TextMate"
tell menu bar 1
tell menu bar item "Text"
tell menu "Text"
tell menu item "Convert"
tell menu "Convert"
click menu item "Tabs to Spaces"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
close window 1 saving yes
end tell
end repeat
return input
end run
![enter image description here](https://i.stack.imgur.com/LhS56.jpg)