Skip to content

Instantly share code, notes, and snippets.

@eric-wood
Created May 25, 2013 00:45
Show Gist options
  • Save eric-wood/5647448 to your computer and use it in GitHub Desktop.
Save eric-wood/5647448 to your computer and use it in GitHub Desktop.
Move shit around or whatever
-- wow I hate applescript
tell application "System Events"
-- get screen bounds
tell application "Finder"
set _b to bounds of window of desktop
set _width to item 3 of _b
set _height to item 4 of _b
end tell
-- get bounds of window
tell application "Clear"
-- don't care, whatever
--set bounds to get bounds of window 1
end tell
-- bring the window to the foreground
tell application "Clear" to activate window 1
-- show window!
set endPosition to _width - 150
repeat with x from _width to endPosition by -2
set position of first window of application process "Clear" to {x, 100}
end repeat
-- you can figure out how to hide the damn thing
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment