Change Keyboard Settings with Automator

Joined
Mar 8, 2010
Messages
3
Reaction score
0
Hello there,

I'm trying to check/uncheck a setting within system preferences (The "Use all F1, F2, etc. keys as standard function keys" checkbox) and am having some mixed results. I'm running an iMac with a cinema display as a secondary monitor.

Here is the sequence I created:
  1. Run AppleScript to open System Preferences
    • This runs fine when I run it from within Automator or when I run the saved automator app
  2. Watch Me Do (Keyboard) - click the Keyboard option within system preferences
  3. Watch Me Do (Click) - check/uncheck the desired checkbox
  4. Watch Me Do (Close) - click the X to close the window
    • Tried the Quite Application action, but it didn't seem to work
Here is the problem I encountered:
  • When I run it from automator, it works fine
  • When I run it as an app, it tells me "The action "Watch Me Do (Keyboard)" encountered an error."
Any ideas? Should this be written as a script? Should I be trying a different approach?

Your help is appreciated.
 
Joined
Mar 8, 2010
Messages
3
Reaction score
0
Works like magic!

Incidentally, I didn't have my app checked off in the Accessibility section, so that was causing issues. But this script is exactly what I'm looking for.

Thanks so much.
 
Joined
Jan 18, 2024
Messages
1
Reaction score
0
I am getting the following error when I try to run this on when I try to run this on Sonoma 14.1.1. Please help if you can? Thank you!


The action "Run AppleScript" encountered an error: "System Events got an error: Can't get checkbox 1 of group 1 of scroll area 1 of group 2 of splitter group 1 of group 1 of sheet 1 of window
1 of process "System Settings".
Invalid index."
OK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top