我总是使用此命令计算窗口:
set windowsnumber to count windows
现在我需要计算包含特定字符串的窗口。
E.g。如果一个进程有5个窗口打开(窗口“A”,“B”,“A”,“C”,“D”),我需要类似“在其标题中包含”A“的计数窗口”,应返回2在这个例子中。
这与applecript一起可行吗?
答案 0 :(得分:2)
使用whose
过滤器:
set windowsnumber to count (windows whose title contains "A")