I know how to check this box thru GUIScripting but I don't find a way to force the app to apply this new setting.
tell application "System Events" to tell process "Finder"
set frontmost to true
keystroke "," using {command down}
tell window 1
--class of UI elements --> {pop up button, checkbox, checkbox, checkbox, checkbox, checkbox, static text, static text, button, button, button, toolbar, static text}
tell toolbar 1
--class of UI elements--> {button, button, button, button}
--name of buttons--> {"Général", "Tags", "Barre latérale", "Options avancées"}
click button 4
end tell # toolbar 1
if value of checkbox 1 = 0 then
click checkbox 1
# code forcing Finder to apply the new setting
end if
end tell # window 1
end tell # System Events …
Thanks in advance.
Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) lundi 5 juin 2017 18:32:30