-
-
Save akshay-bhardwaj/daf93c2e1ed8b79a4619 to your computer and use it in GitHub Desktop.
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
# 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