Skip to content

Instantly share code, notes, and snippets.

@shayarnett
Created September 11, 2008 12:40
Show Gist options
  • Save shayarnett/10210 to your computer and use it in GitHub Desktop.
Save shayarnett/10210 to your computer and use it in GitHub Desktop.
diff --git a/center.applescript b/center.applescript
index 3049271..0dc2ec1 100644
--- a/center.applescript
+++ b/center.applescript
@@ -44,7 +44,7 @@ tell application "System Events"
on error
set {w, h} to {0, 0}
end try
- set position of window 1 to {((screen_width - windowWidth) / 2), ((screen_height - windowHeight) / 2.0) -
+ set position of window 1 to {(((screen_width - windowWidth) / 2) + w), ((screen_height - windowHeight) / 2
set size of window 1 to {windowWidth -w, windowHeight}
end tell
end tell
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment