Volume control macro

I have a non-Apple keyboard.


Is there a way to make macros for raising, lowering and muting the system volume that will affect all apps?


I am stunned by the seeming lack of this in OSX. Am I overlooking something?


Thanks.

Mac mini, OS X Mavericks (10.9.5), Non-Apple keyboard

Posted on Oct 8, 2014 9:51 PM

Reply
1 reply

Oct 9, 2014 4:02 PM in response to bikerL

Just create one.

Create a new Automator Service which receives no input in any application.

Add a Run Applescript action with this code:

set newVolume to (output volume of (get volume settings)) + 10

if newVolume > 100 then set newVolume to 100

set volumeoutput volumenewVolume


Save the Service, then give it a shortcut in Keyboard System Preferences. You'll find it in Shortcuts tab, Services category.


Create another with this code to turn the volume down:

set newVolume to (output volume of (get volume settings)) - 10

if newVolume < 0 then set newVolume to 0

set volumeoutput volumenewVolume


For mute, use:

set isMuted to output muted of (get volume settings)

set volumeoutput muted (not isMuted)

The setting runs from 0 to 100, so you could use any increment you want instead of 10.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Volume control macro

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.