Ask Totally different is a query and reply web site for energy customers of Apple {hardware} and software program. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
One of the best solutions are voted up and rise to the highest
Requested
Seen
16 occasions
I am utilizing the under code to replace the modifier keys to my requirement.
Is there a technique to replace this within the background with out the person’s discover?
inform utility "System Preferences"
if not operating then
run
inform utility "System Occasions"
set bailOut to twenty
repeat till (exists of utility course of "System Preferences") = true
set bailOut to bailOut - 1
if bailOut ≤ 0 then error "Timeout on Run System Preferences!"
finish repeat
finish inform
finish if
--activate
set present pane to pane "com.apple.choice.keyboard"
set bailOut to twenty
repeat till identify of entrance window = "Keyboard"
delay 0.1
set bailOut to bailOut - 1
if bailOut ≤ 0 then error "Timeout on Reveal Anchor Enter of Keyboard Choice!"
finish repeat
inform utility "System Occasions"
inform course of "System Preferences"
click on button "Modifier Keys…" of tab group 1 of window "Keyboard"
click on pop up button 6 of sheet 1 of window "Keyboard"
click on menu merchandise 2 of menu 1 of pop up button 6 of sheet 1 of window "Keyboard"
click on pop up button 1 of sheet 1 of window "Keyboard" --Command
click on menu merchandise 8 of menu 1 of pop up button 1 of sheet 1 of window "Keyboard"
click on button "OK" of sheet 1 of window "Keyboard"
finish inform
finish inform
finish inform
inform utility "System Preferences"
give up
finish inform
Thanks
Ashwin Gopal is a brand new contributor to this web site. Take care in asking for clarification, commenting, and answering.
Try our Code of Conduct.
default