Skip to content

Instantly share code, notes, and snippets.

@JoshMock
Created July 11, 2013 01:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshMock/5971730 to your computer and use it in GitHub Desktop.
Save JoshMock/5971730 to your computer and use it in GitHub Desktop.
Move windows around in AppleScript
try
tell application "Google Chrome"
set the bounds of the second window to {-1400, 0, -100, 900}
set the bounds of the first window to {100, 0, 1500, 2000}
end tell
end try
try
tell application "Mail"
set the bounds of the first window to {-1400, 0, -100, 900}
end tell
end try
try
tell application "Propane"
set the bounds of the first window to {-1400, 0, -100, 900}
end tell
end try
try
tell application "iTerm"
set the bounds of the first window to {100, 0, 1500, 2000}
end tell
end try
try
tell application "MacVim"
set the bounds of the first window to {100, 0, 1500, 2000}
end tell
end try
try
tell application "Adium"
tell window "contacts"
set the bounds to {-200, 0, -1, 800}
end tell
tell chat windows
set the bounds to {-1000, 100, -350, 600}
end tell
end tell
end try
@JoshMock
Copy link
Author

^^ Assumes you have two screens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment