P
P
pislev2018-12-14 01:54:40
macOS
pislev, 2018-12-14 01:54:40

Why doesn't hotkey service start on Mac OS?

Good day!
I need to quickly turn off the microphone. Set up a service in Automator that calls AppleScript:

Screen
5c12dfaf33587077936075.png
The code
on run {input, parameters}
  
  set inputVolume to input volume of (get volume settings)
  if inputVolume = 0 then
    set inputVolume to 100
    set displayNotification to "Microphone Unmuted"
  else
    set inputVolume to 0
    set displayNotification to "Microphone Muted"
  end if
  set volume input volume inputVolume
  
  display notification displayNotification
  delay 1
  
  return input
end run
Created a hotkey for this service in the keyboard settings
From this menu everything works as it should.
5c12e05d9672a391749846.png
From the "system settings" the hotkey also works, but from other places (Finder, browser, etc.) it does not work in any way.
How can I make it work everywhere, not just in settings?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question