Created
December 10, 2022 19:04
-
-
Save tru2dagame/9ae82654807e6d0b84832f6c89af2e5c to your computer and use it in GitHub Desktop.
Unfold Safari default tab list with apple script
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" | |
-- https://stackoverflow.com/questions/56188308/how-to-script-a-button-click-based-on-label-or-identifier | |
tell application process "Safari" to tell window 1 | |
click UI element 1 of group 1 of toolbar 1 | |
delay 1 | |
try | |
if not (value of checkbox 1 of UI element 1 of row 1 of outline 1 of scroll area 1 of group 1 of splitter group 1 as boolean) then | |
click checkbox 1 of UI element 1 of row 1 of outline 1 of scroll area 1 of group 1 of splitter group 1 | |
end if | |
on error | |
-- do nothing to skip the error | |
end try | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment