

If (ctrlVal contains "Command") then set numDown to 1 - for Control TOGGLE CONTROL KEY Between CONTROL & COMMAND KEY CODE. Repeat until (button "Modifier Keys…" of tab group 1) existsĬlick button "Modifier Keys…" of tab group 1 Set elapTime to my pauseUntilWin("Keyboard", "System Preferences", 1) Set elapTime to my pauseUntilWin("System Preferences", "System Preferences", 1)Ĭlick button "Keyboard" of scroll area 1 of window "System Preferences"

Tell application "System Preferences" to activate Set frontApp to path to frontmost application as text Use AppleScript version "2.4" - Yosemite (10.10) or later

Here's an example to help get you started. I made a script, and I can't get it to work at the "Modifier keys."
