通过AXStaticText在applescript中获取一行

通过AXStaticText在applescript中获取一行,applescript,Applescript,虽然我可以获得该值,但为什么不能在“which”子句中将其用作筛选器? 谢谢。静态文本的值似乎返回一个类似于{“Wi-Fi,已连接”}的列表。尝试使用将列表强制为文本的重复循环: value of static text of row 1 of (table 1 of some scroll area) --> {"Wi-Fi, Connected"} select (row of (table 1 of some scroll area) who

虽然我可以获得该值,但为什么不能在“which”子句中将其用作筛选器?
谢谢。

静态文本的值
似乎返回一个类似于
{“Wi-Fi,已连接”}
的列表。尝试使用将列表强制为文本的重复循环:

value of static text of row 1 of (table 1 of some scroll area)
        --> {"Wi-Fi, Connected"}

select (row of (table 1 of some scroll area)
            whose (value of static text) begins with "Wi-Fi")
error "Can’t get attribute \"AXValue\" of static text."
            number -1728 from «class attr» "AXValue" of «class sttx»
tell application "System Events" to tell process "System Preferences"
    repeat with r in rows of table 1 of scroll area 1 of window 1
        if (value of static text of r as text) starts with "Wi-Fi" then return r
    end repeat
end tell