Skip to content

Instantly share code, notes, and snippets.

-- Click “System Preferences” in the Dock.
delay 0.5
set timeoutSeconds to 0.000000
set uiScript to "click UI Element \"System Preferences\" of list 1 of application process \"Dock\""
my doWithTimeout( uiScript, timeoutSeconds )
-- Click the “Network” button.
delay 0.5
set timeoutSeconds to 0.000000
set uiScript to "click UI Element \"Network\" of scroll area 1 of window \"System Preferences\" of application process \"System Preferences\""