Property ptyUsedMac : "MacBook Pro 7.1 13inch 2010" Property ptyUsedOS : "macOS High Sierra (10.13.6)" Property ptyFrameworksInUse : "IOBluetooth" Property ptyScriptLang : "AppleScriptObjective-C" Property ptyScriptModDate : "November, 13th 2022 - GMT+1" Property ptyScriptAuthor : "Jim Krenz (KMF=> - lifting/mod by T.Zittlau (KMF=> ptyScriptDate : "unknown" Property ptyScriptName : "Toggle Connection to AirPods Max" I've revised the code and migrated it to use properties for a little possible performance boost and readability. Maybe Apple has changed something significant to this in AppleScript but all I am aware of is that they didn't. In this case you will have to use device's nameOrAddress as text - otherwise you'll get the error code 2741 when debugging the code with Script Debugger. The less knowledge I have is that this will not compile because the Information you are asking for is in the handling of constants ( device's nameOrAddress.) and not a class where this eventually might be possible to ask for a "string". There is something I've read somewhere in the Your Script is written using device's nameOrAddress as string. It’s reported to work on Ventura with Apple Silicon devices I’m not certain about Intel devices since on the ones I have I am still running Monterey.ĪppleScript (click to expand/collapse) (* Author: Ike Nassi because 13.0 (Ventura) re-wrote System Preferences broke several earlier control panelsįirst of all, thank you Jim for providing this very handy little AppleScript for toggling the connection to a Bluetooth Device. have you ever heard of the Homebrew package switchaudio-osx? I use it to change audio input and output and it’s phenomenal. This will automatically format it for easy legibility.Īfter that, you can also “hide details” to reduce the visible length of the post if you‘d like. To help us better understand what the macro (and by extension, AppleScript does), you can paste the AppleScript itself into the post, surround by three tick ( `) marks (like I did with your AppleScript). Hey Ike, for macros that use AppleScript actions, the bulk of the script ends up hidden in the screenshot. display dialog "Input set to " & myInputĭisplay dialog "Error setting input sound" If (name of first item of static text of group 1 of UI element 1 of aRow) starts with myInput then Note: the input pane is different from the output pane, so we use "group 2" now instead of "group 1" used in the output pane Tell radio button 2 of tab group 1 of group 2 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Sound" display dialog "Output set to " & myOutputĭisplay dialog "Error setting output sound" If (name of first item of static text of group 1 of UI element 1 of aRow) starts with myOutput then why are there multiple items in this group? I dont' know display dialog "Try this one " & (name of first item of static text of group 1 of UI element 1 of aRow) Set theRows to (every row of table 1 of scroll area 1 of group 2 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Sound") Tell radio button 1 of tab group 1 of group 2 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Sound" Tell application process "System Settings" use this method since the list of panes can change from machine to machine, but the name does not select row mySoundIndex of outline 1 of scroll area 1 of group 1 of splitter group 1 of group 1 of theWindow Set myOutput to getvariable "OutputDevice" Tell application "Keyboard Maestro Engine" Was essential in figuring out what new the UI hierarchy looks like Window Analysis Tool for System Events v1.50 Special shout-out to ccstone, whose macro Set Sound Ventura.kmmacros (4.5 KB) (* Author: Ike Nassi because 13.0 (Ventura) re-wrote System Preferences broke several earlier control panels
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |