I've got a WQHD (1440p) Monitor hooked up to my 13 inch MacBook Pro when I'm sitting at my desk. Love the high resolution (much screen real estate) but sometimes I find myself toggling Safari's Zoom to 125%:
Is there an option to toggle this setting by Script/Terminal Command or else automatically? If so I could toggle it automatically when connecting the monitor with Control Plane.
This code gets to the right settings tab, but I can’t figure out how to set the zoom level:
tell application "System Events"
tell application process "Safari"
set frontmost to true
keystroke "," using command down
delay 1
tell window 1
click button "Advanced" of toolbar 1 of it
delay 1
keystroke "w" using command down
end tell
end tell
end tell
Best Answer
This Applescript code sets the zoom level globally:
change
menu item 4
to5
for a 115% or6
for 125% zoom level.Using an Applescript is better than using
cmd +
/cmd + -
because it sets the default zoom for all pages.