Jump to content

Recommended Posts

Following are some Applescripts that allow Alfred Remote to control the zoom on your screen.  First go to System Preferences > Accessibility > Zoom and make sure "Use keyboard shortcuts to zoom" is checked.  You will probably also want to check the Smooth images checkbox.

 

Then for each of the following scripts, go to 

 

Alfred Preferences > Remote > System Commands (or wherever you want on your remote) > + > Run Script > language: /usr/bin/osascript

 

then paste in the corresponding Applescript.
 
Zoom In:
tell application "System Events"
	key code 24 using {command down, option down}
end tell

Zoom Out:

tell application "System Events"
	key code 27 using {command down, option down}
end tell

Toggle Zoom:

tell application "System Events"
	key code 28 using {command down, option down}
end tell

These scripts are pretty trivial but it took me a bit of searching to realize that using Applescript's keystroke command doesn't work, but using key code # does.

Edited by dfay
Link to comment

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...