Created
December 13, 2023 13:09
-
-
Save supersational/e3a4e2de3ba7ac9416a2bee3fa946c20 to your computer and use it in GitHub Desktop.
Unminimise last minimised app
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 "System Events" to tell process "Dock" | |
set dockUIElements to UI elements of list 1 | |
repeat with i from (count dockUIElements) to 1 by -1 | |
set anElement to item i of dockUIElements | |
if ((role description of anElement) as string) is equal to "minimised window dock item" then | |
click anElement | |
exit repeat | |
end if | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment