无法使用applescript在窗口中找到元素
我是applescript的新手。我想访问对话框/窗口中的元素。我尝试了以下代码无法使用applescript在窗口中找到元素,applescript,Applescript,我是applescript的新手。我想访问对话框/窗口中的元素。我尝试了以下代码 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 i
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
if w's name contains "App Name" then
copy w's name to the end of windowName
copy properties of w to the end of windowName
end if
end repeat
end if
end try -- ignore errors
end repeat
end tell
return windowName
但我只能从窗口获取4个元素:
1.关闭
2.尽量减少
3.最大化
4.窗口标题
窗户里什么也没有
有人能帮我吗 您只是询问窗口的名称和属性。如果您想要它的元素,那么请求它的“ui元素”。尝试过的ui元素也会返回相同的4个元素。