Я просто пытаюсь записать состояние объектов на протяжении всей жизни своего приложения. В других языках методы object toString() будут отображать эквивалент текста, и я могу их использовать. В AppleScript это, похоже, не так.
convert applescript object to string (similar to toString)
Выведет объект-искатель (и его свойства) в окно "Результаты" редактора AppleScript, но только если это последний оператор, который будет выполнен.
Если у меня есть оператор trace() (который принимает сообщение для целей ведения журнала):
on trace(message)
do shell script "cat >>~/log/applescript.txt <<END_OF_THE_LOG
" & (message as text) & "
END_OF_THE_LOG"
end trace
и попробуйте записать один и тот же объект, я получаю
Can’t make properties of application "Finder" into type text.
Я открыт для лучшего способа входа в консоль, но хотел бы узнать, как написать свойства объекта (например, редактор AppleScript) в середине script для тестирования в любом случае.