Created
October 29, 2012 18:02
-
-
Save henrymazza/3975283 to your computer and use it in GitHub Desktop.
Animate Window Resize
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
try | |
set front_app to (path to frontmost application as Unicode text) | |
set c to 3 | |
tell application front_app | |
activate | |
set {l, t, r, b} to bounds of window 1 | |
log {l, t, r, b} | |
repeat until (((b - 150 - 804) ^ 2) ^ 0.5) < 2 | |
set b to b + (150 + 804 - b) / c | |
set r to r + (240 + 1232 - r) / c | |
set t to t + (150 + 36 - t) / c | |
set l to l + (240 + 208 - l) / c | |
log {l, t, r, b} | |
set bounds of window 1 to {l, t, r, b} | |
end repeat | |
end tell | |
end try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The loop works surprisingly well to animate it.