Jump to content

Toggle Safari Extensions


Recommended Posts

Here is the content of the script (as found in the Run NSAppleScript block in the workflow).  You can adjust the duration of any of the delay commands.  But some delay is likely to be necessary for UI scripting to work successfully.  

 

on alfred_script(q)

tell application "Safari" to activate
delay 2
tell application "System Events" to tell process "Safari"
keystroke "," using command down
delay 2
tell window 1
click button "Extensions" of tool bar 1
delay 1
click checkbox 1 of group 2 of UI element 1 of scroll area 1 of group 1 of group 1
end tell
keystroke "w" using command down
end tell
end alfred_script
Edited by dfay
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...