I’m fairly new to scripting, and I am reimaging several iMacs, so here’s what I’d like to do:
I’d like to run a script that allows all keyboard layouts to be selected in the ‘Input Menu’ of the ‘International’ pane in System Preferences. I have enabled access for assistive devices in ‘Universal Access’ and I have copied a script provided by Jacques in another thread, but I haven’t been able to manipulate it correctly:
tell application "System Preferences"
set current pane to pane id "com.apple.Localization"
tell application "System Events" to tell application process "System Preferences" to tell window "International"
click radio button "Input Menu" of tab group 1
set this_rows to rows of table 1 of scroll area 1 of tab group 1
repeat with i in this_rows
if value of checkbox 1 of i is 0 then
select i
click checkbox 1 of i
end if
end repeat
end tell
end tell
I get AppleScript Error ‘NSReceiverEvaluationScriptError: 4’ when I run it. Any suggestions/corrections?