Skip to content

Instantly share code, notes, and snippets.

@akshay-bhardwaj
Created September 9, 2014 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akshay-bhardwaj/daf93c2e1ed8b79a4619 to your computer and use it in GitHub Desktop.
Save akshay-bhardwaj/daf93c2e1ed8b79a4619 to your computer and use it in GitHub Desktop.
# Input: This script takes the PID of application.
# Behaviour: Maximizes the application and makes it frontmost
# Author: Akshay Bhardwaj
property processId : 976
tell application "Finder"
set {0, 0, dtw, dth} to bounds of window of desktop
end tell
tell application "System Events"
set theprocs to every process whose unix id is processId
repeat with proc in theprocs
set the frontmost of proc to true
tell proc
if name is not in {"Finder"} then
set position of windows to {0, 0}
set size of windows to {dtw, dth}
end if
end tell
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment