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
-- get Dock height | |
tell application "System Events" to tell process "Dock" | |
set dock_dimensions to size in list 1 | |
set dock_height to item 2 of dock_dimensions | |
end tell | |
-- get the new width and height for the window | |
tell application "Finder" | |
set desktop_dimensions to bounds of window of desktop | |
set new_width to (item 3 of desktop_dimensions) / 2 | |
set new_height to (item 4 of desktop_dimensions) - dock_height |
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
-- get Dock height | |
tell application "System Events" to tell process "Dock" | |
set dock_dimensions to size in list 1 | |
set dock_height to item 2 of dock_dimensions | |
end tell | |
-- get the new width and height for the window | |
tell application "Finder" | |
set desktop_dimensions to bounds of window of desktop | |
set new_width to (item 3 of desktop_dimensions) / 2 | |
set new_height to (item 4 of desktop_dimensions) - dock_height |