我的 appleScript 需要一些帮助。
对于所有打开的窗口,我想知道哪个是隐藏的(在 Dock 中),哪个是可见的,哪个是聚焦的?
要列出我使用的窗口:
tell application "System Events"
set procs to processes
set windowName to {}
repeat with proc in procs
try
if exists (window 1 of proc) then
repeat with w in windows of proc
copy w's name to the end of windowName
end repeat
end if
end try -- ignore errors
end repeat
end tell
return windowName
我尝试了重点属性:
copy w's focused to the end of windowName
和选定的属性:
copy w's selected to the end of windowName
但这不起作用!
感谢帮助!