質問

I've always counted windows using this command:

set windowsnumber to count windows

Now I'm in the need of counting windows that contain a specific string.

E.g. If a process has 5 windows opened (windows "A", "B", "A", "C", "D"), I need something like "count windows that contains "A" in their title", should return 2 in this example.

Is this feasible with applescript?

役に立ちましたか?

解決

Use the whose filter :

set windowsnumber to count (windows whose title contains "A")
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top