Last active
April 20, 2017 03:40
-
-
Save jnothman/f794197abeb2da4ff6470ac791d014eb to your computer and use it in GitHub Desktop.
Apple script to get windows back on screen
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
#!/usr/bin/osascript | |
on run argv | |
set l to 0 | |
set t to 0 | |
repeat with j from 1 to (count argv) | |
set a to item j of argv | |
tell application a | |
repeat with x from 1 to (count windows) | |
set b to bounds of window x | |
set w to item 3 of b - item 1 of b | |
set h to item 4 of b - item 2 of b | |
set bounds of window x to {l, t, w + l, h + t} | |
end repeat | |
end tell | |
end repeat | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment