Created
December 6, 2011 16:22
-
-
Save NeoCat/1438794 to your computer and use it in GitHub Desktop.
Count windows of the specified application in MacOS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
osascript -e 'tell application "System Events" | |
try | |
count every window of process "'"$1"'" | |
on error | |
0 | |
end try | |
end tell' 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment