Created
June 3, 2019 00:15
-
-
Save MCJack123/ab02379aeeb8dd4053265c603d560764 to your computer and use it in GitHub Desktop.
Evil window manipulation AppleScript
This file contains hidden or 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
tell application "Finder" to set theBounds to bounds of window of desktop | |
repeat | |
set theNumber to random number from 1 to 1000000 | |
try | |
tell application (path to frontmost application as text) | |
if theNumber is 51 then set bounds of front window to theBounds | |
if theNumber is 87 then set miniaturized of front window to true | |
end tell | |
on error | |
try | |
tell application "System Events" to tell (process 1 where frontmost is true) | |
if theNumber is 51 then set bounds of front window to theBounds | |
if theNumber is 87 then set miniaturized of front window to true | |
end tell | |
end try | |
end try | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment