If you can’t edit the property list, you may use GUI Scripting.
(*
<key>EZZ-YH-uQs.ibShadowedLabels[0]</key>
<string>Canaux</string> -- Channels
<key>EZZ-YH-uQs.ibShadowedLabels[1]</key>
<string>Profondeur de bit</string> -- Bit Depth
<key>EZZ-YH-uQs.ibShadowedLabels[2]</key>
<string>Format</string> -- Format
<key>EZZ-YH-uQs.ibShadowedLabels[3]</key>
<string>Débit</string> -- Rate
<key>EbO-3B-WTi.label</key>
<string>Sortie</string> -- Output
<key>M7l-iX-z2O.ibExternalAccessibilityDescription</key>
<string>Horloge source</string> -- Clock Source
<key>nec-KC-gas.label</key>
<string>Entrée</string> -- Input
<key>guw-kJ-yJv.title</key>
<string>Source :</string> -- Source:
<key>gZJ-6C-MMO.title</key>
<string>Format :</string> -- Format:
<key>Vva-Yz-dLj.ibExternalAccessibilityDescription</key>
<string>Supprimer le périphérique agrégé</string> -- Remove Aggregate Device
<key>Y1g-eT-QpE.ibExternalAccessibilityDescription</key>
<string>Créer un périphérique agrégé</string> -- Create Aggregate Device
<key>b2n-bJ-4Fu.title</key>
<string>Périphériques audio</string> -- Audio Devices
*)
property ruleHP : false -- Edit to fit your needs
-- true --> trigger UI ruling the HP
-- false --> doesn't triiger the UI ruling the HP
set theBundle to ((path to library folder from system domain as string) & "Extensions:AppleHDA.kext:") as «class furl»
set devShortNameOut_loc to localized string "DevShortNameOut" in bundle theBundle --> "Sortie intégrée"
set digitalOut_loc to localized string "DigitalOut" in bundle theBundle --> "Sortie numérique"
set devShortNameSpdo_loc to localized string "DevShortNameSpdo" in bundle theBundle --> "Sortie numérique intégrée"
set deviceNameDigitalOut_loc to localized string "DeviceNameDigitalOut" in bundle theBundle --> "Sortie numérique audio intégrée"
set deviceNameLineOut_loc to localized string "DeviceNameLineOut" in bundle theBundle --> "Sortie ligne audio intégrée"
set lineOut_loc to localized string "LineOut" in bundle theBundle --> "Sortie ligne"
set devShortNameHdpn_loc to localized string "DevShortNameHdpn" in bundle theBundle --> "Sortie - Écouteurs"
set deviceNameHeadphone_loc to localized string "DeviceNameHeadphone" in bundle theBundle --> "Sortie audio - Écouteurs"
set devShortNameLino_loc to localized string "DevShortNameLino" in bundle theBundle --> "Sortie ligne intégrée"
set sys2 to (system attribute "sys2") as integer
if sys2 > 13 then
-- CAUTION, this string is used only since Mojave
set theBundle to ((path to library folder from system domain as string) & "Audio:Plug-Ins:HAL:BridgeAudioSP.driver:") as «class furl»
set headphones_loc to localized string "Headphones" in bundle theBundle --> "Écouteurs externes"
end if
if sys2 > 13 then
set myOutPut to headphones_loc -- Edit to fit your needs
else
set myOutPut to devShortNameLino_loc -- Edit to fit your needs by selecting one of the values defined above (maybe devShortNameHdpn_loc or deviceNameHeadphone_loc)
end if
set myRadioButton to 4 -- Edit to fit your needs -- Here I select "Débit"
-- 1 --> "Canaux"
-- 2 --> "Profondeur de bit"
-- 3 --> "Format"
-- 4 --> "Débit"
set myMenuItem to 7 -- Here I select "2 canaux 16 bits (44,1 kHz)" -- Edit to fit your needs
tell application "Audio MIDI Setup" to activate
tell application "System Events" to tell process "Audio MIDI Setup"
set frontmost to true
tell window 1
-- class of UI elements --> {splitter group, button, button, button, static text}
-- value of static text 1 --> "Périphériques audio"
-- subrole of buttons --> {"AXCloseButton", "AXFullScreenButton", "AXMinimizeButton"}
tell splitter group 1
-- class of UI elements --> {button, menu button, button, menu button, scroll area, splitter, static text, static text, pop up button, button, tab}
-- description of buttons --> {"bouton", "Supprimer le périphérique agrégé", "Aide"}
-- description of menu buttons --> {"Créer un périphérique agrégé", "Action de l’appareil"}
-- value of static texts --> {"Sortie intégrée", "Horloge source :"}
tell scroll area 1
-- class of UI elements --> {outline}
tell outline 1
-- class of UI elements --> {row, row, row, row, column}
(*
tell row 1
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {image, static text, static text, image, image, image}
value of static texts --> {"Micro intégré", "2 entrées / 0 sortie"}
end tell
end tell
tell row 2
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {image, static text, static text, image, image, image}
value of static texts --> {"Entrée intégrée", "2 entrées / 0 sortie"}
end tell
end tell
tell row 3
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {image, static text, static text, image, image, image}
value of static texts --> {"Sortie intégrée", "0 entrée / 2 sorties"}
end tell
end tell
tell row 4
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {image, text field, static text, image, image, image, UI element}
value of text field 1 --> "Pro Tools Aggregate I/O"
value of static text 1 --> {"4 entrées / 2 sorties"}
tell UI element 1
class of UI elements --> {}
end tell
end tell
end tell
*)
repeat with aRow in every row
if value of static text 1 of UI element 1 of aRow is myOutPut then
set {{x, y}, {w, h}} to {position, size} of aRow
tell me to do shell script "/usr/local/bin/cliclick c:" & x + w - 10 & "," & y + h div 2
end if
end repeat
end tell
end tell
tell splitter 1
--class of UI elements --> {}
end tell
tell tab group 1
-- class of UI elements --> {radio button, radio button, static text, pop up button, static text, pop up button, button, scroll area}
-- value of static texts --> {"Source :", "Format :"}
-- name of radio buttons --> {"Entrée", "Sortie"}
-- description of pop up buttons --> {"Horloge source", "Format"}
tell pop up button 1
-- its value --> "Haut-parleurs internes"
click it
tell menu 1 to get name of menu items --> {"Haut-parleurs internes"}
end tell
tell pop up button 2
-- its value --> "2 canaux 24 bits entier 44,1 kHz"
set {{x, y}, {w, h}} to {position, size}
tell me to do shell script "/usr/local/bin/cliclick dc:" & x + w - 10 & "," & y + h div 2
-- class of UI elements --> {menu}
tell menu 1
class of UI elements --> {menu item, menu item, menu item, menu item…
-- repeat with myRadioButton from 1 to 4 -- the count of possible radio buttons
tell menu item 1
-- its title --> missing value
click it
-- class of UI elements --> {radio group}
tell radio group 1
-- class of UI elements --> --> {radio button, radio button, radio button, radio button}
name of radio buttons --> {"Canaux", "Profondeur de bit", "Format", "Débit"}
tell radio button myRadioButton to click it
end tell -- radio group 1
end tell -- menu item 1
-- class of UI elements --> {menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item, menu item}
name of menu items
-- if myRadioButton = 1
--> {missing value, missing value, "2 canaux", "16 bit entier (44,1 kHz)", "16 bit entier (48,0 kHz)", "16 bit entier (88,2 kHz)", "16 bit entier (96,0 kHz)", "20 bit entier (44,1 kHz)", "20 bit entier (48,0 kHz)", "20 bit entier (88,2 kHz)", "20 bit entier (96,0 kHz)", "24 bit entier (44,1 kHz)", "24 bit entier (48,0 kHz)", "24 bit entier (88,2 kHz)", "24 bit entier (96,0 kHz)", "32 bit nombre à virgule flottante (44,1 kHz)", "32 bit nombre à virgule flottante (48,0 kHz)", "32 bit nombre à virgule flottante (88,2 kHz)", "32 bit nombre à virgule flottante (96,0 kHz)"}
-- if myRadioButton = 2
--> {missing value, missing value, "16 bit", "2 canaux entier (44,1 kHz)", "2 canaux entier (48,0 kHz)", "2 canaux entier (88,2 kHz)", "2 canaux entier (96,0 kHz)", "20 bit", "2 canaux entier (44,1 kHz)", "2 canaux entier (48,0 kHz)", "2 canaux entier (88,2 kHz)", "2 canaux entier (96,0 kHz)", "24 bit", "2 canaux entier (44,1 kHz)", "2 canaux entier (48,0 kHz)", "2 canaux entier (88,2 kHz)", "2 canaux entier (96,0 kHz)", "32 bit", "2 canaux nombre à virgule flottante (44,1 kHz)", "2 canaux nombre à virgule flottante (48,0 kHz)", "2 canaux nombre à virgule flottante (88,2 kHz)", "2 canaux nombre à virgule flottante (96,0 kHz)"}
-- if myRadioButton = 3
--> {missing value, missing value, "Entier", "2 canaux 16 bits (44,1 kHz)", "2 canaux 16 bits (48,0 kHz)", "2 canaux 16 bits (88,2 kHz)", "2 canaux 16 bits (96,0 kHz)", "2 canaux 20 bits (44,1 kHz)", "2 canaux 20 bits (48,0 kHz)", "2 canaux 20 bits (88,2 kHz)", "2 canaux 20 bits (96,0 kHz)", "2 canaux 24 bits (44,1 kHz)", "2 canaux 24 bits (48,0 kHz)", "2 canaux 24 bits (88,2 kHz)", "2 canaux 24 bits (96,0 kHz)", "Nombre à virgule flottante", "2 canaux 32 bits (44,1 kHz)", "2 canaux 32 bits (48,0 kHz)", "2 canaux 32 bits (88,2 kHz)", "2 canaux 32 bits (96,0 kHz)"}
-- if myRadioButton = 4
(*{
missing value,
missing value,
"44,1 kHz",
"2 canaux 16 bits entier",
"2 canaux 20 bits entier",
"2 canaux 24 bits entier",
"2 canaux 32 bits nombre à virgule flottante", <-- What you asked for (index 7)
"48,0 kHz",
"2 canaux 16 bits entier",
"2 canaux 20 bits entier",
"2 canaux 24 bits entier",
"2 canaux 32 bits nombre à virgule flottante", <-- What is selectyed on your screenshot (index 12)
"88,2 kHz",
"2 canaux 16 bits entier",
"2 canaux 20 bits entier",
"2 canaux 24 bits entier",
"2 canaux 32 bits nombre à virgule flottante",
"96,0 kHz",
"2 canaux 16 bits entier",
"2 canaux 20 bits entier",
"2 canaux 24 bits entier",
"2 canaux 32 bits nombre à virgule flottante"}
*)
-- Here I select "2 canaux 16 bits (44,1 kHz)"
click menu item 4 -- Edit to fit yor needs
-- end repeat
end tell -- menu 1
end tell -- pop up button 2
end tell -- tab group 1
end tell --splitter group 1
if ruleHP then
tell splitter group 1
tell tab group 1
name of button 1 --> "Configuration des haut-parleurs…"
tell scroll area 1
class of UI elements --> {outline}
tell outline 1
class of UI elements --> {row, row, row, row, column, column, column, column, group}
tell row 1
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {static text, UI element}
value of static text 1 --> {"Flux principal"}
{role, value} of UI element 2 --> {"AXDisclosureTriangle", 1}
end tell
end tell -- row 1
tell row 2
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {static text, slider}
value of static text 1 --> {"Maître"}
{role, value, maximum value} of slider 1 --> {"AXSlider", 0.0, 1.0}
end tell
end tell -- row 2
tell row 3
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {static text, slider}
value of static text 1 --> "1"
{role, value, maximum value} of slider 1 --> {"AXSlider", 0.496105879545, 1.0}
end tell
end tell -- row 3
tell row 4
class of UI elements --> {UI element}
tell UI element 1
class of UI elements --> {static text, slider}
value of static text 1 --> "2"
{role, value, maximum value} of slider 1 --> {"AXSlider", 0.496105879545, 1.0}
end tell
end tell -- row 4
end tell -- outline 1
end tell -- scroll area 1
end tell -- tab group 1
end tell -- splitter group 1
end if -- ruleHP
end tell
end tell
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) samedi 2 mai 2020 22:49:33
Edited according to complementary infos given below