This macro requires Keyboard Maestro v10.0+. If another Language is set under System Preferences (or System Settings) Language & Region, the variable local_Pane needs to be set to Sound|Geluid|Ton (English, Nederlands, or Deutsch). LOCALIZATIONīy default, the AppleScript User Interface Scripting is set for English. If the Call As a Subroutine dialog checkbox is selected, the created macro will have the flexibility to use the SUBROUTINE PARAMETERS described above. For example, Jim’s AirPods Pro includes a smart apostrophe ( ’ ). Note that any spaces and punctuation marks must exactly match the entries in the System Preferences (or System Settings) > Sound > Output. The dialog will prompt for the Sound Output Name. If the macro is executed directly (e.g., from the Keyboard Maestro Editor), a dialog will appear that presents an option to create a calling macro. This value specifies the action to be taken with the System Preferences (or System Settings) after the Sound Input is set. This value can then be retrieved by another instance of Set Sound Output ( SSO) or the sister macro Set Sound Input ( SSI).Ġ (Initial State, i.e., the state when SSO started i.e., Open|Closed, if Open, which Displayed Pane)ġ (Saved State, i.e., the state saved in the Dictionary by SSO or SSI) This saves, in a persistent Dictionary, the Open|Closed state and, if Open, the Displayed Pane. If this subroutine is called using Execute a Subroutine action, additional features are provided that can be useful if the macro is combined with Set Sound Input. See Automating the User Interface ( Mac Automation Scripting Guide: Automating the User Interface) for more information. Note that this shortcut uses AppleScript that automates the User Interface, specifically the System Preferences (Monterey or earlier) or System Settings (Ventura+). This can include Apple HomePods and other AirPlay devices. This macro/subroutine, when executed from another macro using the Execute a Macro action, sets the Macintosh Sound Output to a specified name. If you have Keyboard Maestro Version 11+ and you are not interested in including HomePods and other AirPlay devices, you could create a much simpler macro using the new Set Audio Device action. For more information see: Using 'Set Sound Output' and 'Set Sound Input' Together This macro and Set Sound Input can be used together to efficiently change sound settings. Thus I created a macro that completes this task using AppleScript that automates the macOS User Interface. When I tried using switchaudio-osx as mentioned in the post, it didn't function for my HomePod or other AirPlay devices. I found a post, Program to Switch Audio Output, as I was searching the Keyboard Maestro Forum for a method to quickly switch the macOS Audio Output.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |