Hi
New to the forum. First entry.
On the Forum was a question about opening a Sound PrefPane and Michel Bujardet showed how to do it.
My question is once the PrefPane is open what is the code that is used to make selections within the PrefPane on the Menus and devices. Also does the PrefPane have to be opened to make selections.
Thanks
Dim s As Shell
s = New Shell
s.Execute ("open -b com.apple.systempreferences /System/Library/PreferencePanes/Sound.prefPane")
s.Close
Thanks for the info. Perhaps I should explain what I am trying to do. I am trying to code a program just for my own use to Open the sound panel in the Preferences. With the Shell code I get the sound panel open , then I want to be able to select “Output” in the upper menu then select a device for sound output. I will want to select between “Line Out” and my Bluetooth Headset.
I could not find any examples on how to make selections in any preferences panels.
Any help is appreciated.
I doubt extremely much you can achieve that by simple means. As far as I know pref panes are not scriptable with AppleScript, and you certainly cannot achieve that with shell.
It is possible that this can be obtained by going deep into the system with a declare, but that goes far beyond simple. Or even documented.
[quote=281499:@Lewis Ponchek]…then I want to be able to select “Output” in the upper menu then select a device for sound output. I will want to select between “Line Out” and my Bluetooth Headset.
I could not find any examples on how to make selections in any preferences panels.
Any help is appreciated.[/quote]
I am new to Xojo and not sure I have explained what i want to do very well. The code from Axel was too much for my experience. Maybe I will try to accomplish my code with Applescript.
Thanks for all your help.
Looking at the audiodevice utility source it’s calling (deprecated) Core Audio functions. You could replace this with direct declare calls but that’s extra hassle