Frage

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?

War es hilfreich?

Lösung

Use the whose filter :

set windowsnumber to count (windows whose title contains "A")
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top