Você pode tentar algo como:
-- Example elements
tell application "System Events" to tell process "Finder"
set uiElements to (get UI elements)
end tell
set uiTextList to {}
repeat with uiE in uiElements
try
set uiText to uiE as text
set end of uiTextList to uiText
on error errMsg
set {TID, text item delimiters} to {text item delimiters, {"Can’t make ", " into type text."}}
set end of uiTextList to text item 2 of errMsg
set text item delimiters to TID
end try
end repeat
do shell script "echo " & quoted form of (uiTextList as text) & " > " & quoted form of POSIX path of (path to desktop as text) & "log.txt"