Created
February 23, 2013 17:12
-
-
Save anonymous/5020503 to your computer and use it in GitHub Desktop.
This file contains 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
tell application "Finder" to set desktopBounds to bounds of window of desktop | |
set screenWidth to item 3 of desktopBounds | |
set screenHeight to item 4 of desktopBounds | |
tell application "System Events" | |
set apps to every process whose visible is true | |
if ((count of apps) = 0) then return | |
end tell | |
repeat with i from 1 to (count of apps) | |
tell application "System Events" | |
set anApp to application file of (item i of apps) | |
end tell | |
tell application (anApp as string) | |
try | |
set resizableAppWindows to (every window whose resizable is true) | |
end try | |
repeat with ii from 1 to (count of resizableAppWindows) | |
set appWindow to item ii of resizableAppWindows | |
set bounds of appWindow to {10, 35, (screenWidth - 10), (screenHeight - 80)} | |
end repeat | |
end tell | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to get this working when a user has multiple screens? I use a laptop with two monitors plugged in and it just forces the window to be resized to the width of the 3 monitors combined..