Hi guys!
Simple question, I have a Widget that runs this Apple Script and Shows the return value:
tell application "System Preferences"
reveal anchor "Text" of pane id "com.apple.preference.keyboard"
delay 0.5
tell application "System Events"
tell pop up button 3 of tab group 1 of window 1 of application process "System Preferences"
if value is "Automatic by language" then
return "🌐"
else if (value) is "Français" then
return "🇫🇷"
else if (value) is "Deutsch" then
return "🇩🇪"
else if (value) is "Italiano" then
return "🇮🇹"
else if (value) is "U.S. English" then
return "🇺🇸"
else
return "❔"
end if
end tell
quit
end tell
quit
end tell
But System Preferences remains open, not minding the "quit" at the end. Did I miss something?
Thanks!
(Sorry if this is super basic, I barely touched Apple Script for now and am not sure if I messed up somewhere of if BTT keeps the System Prefs alive to show the return value.)