tell application "System Events"
set window_check to false
repeat until (window_check)
set frontApp to name of first application process whose frontmost is true
if frontApp is "Microsoft Outlook" then
tell process "Microsoft Outlook"
if class of front window is draft window then
--syntax error: expected "then", etc. but found class name
display dialog "draft"
set window_check to true
end if
end tell
end if
end repeat
end tell
当我保存脚本时,它会弹出一个错误“语法错误:预期的“then”等,但找到了类名”(请参阅错误位置的注释)
我的脚本有什么问题?