Я написал эту функцию скрипта
on GetWindowLocation()
set front_app to (path to frontmost application as Unicode text)
tell application front_app
item 1 of (get bounds of front window)
end tell
end GetWindowLocation
on GetDockStatus()
tell application "System Events" to get the autohide of the dock preferences
end GetDockStatus
, если я нахожусь на рабочем столе без каких-либо ошибок.Как я могу проверить, есть ли окно на экране, чтобы я мог поставить оператор if, чтобы он не запускался, если окно не на экране.