In case you don’t get it working with KM, another option to consider is another low-level utility called ControllerMate by OrderedBytes. If you come up with a final, or better solution, please post. Set elapTime to (-(round ((startTime's timeIntervalSinceNow()) * 100)) / 100.0) Set uiElem to UI elements of window pWinTitle of process pProcessName "Window: " & pWinTitle & LF & "Process: " & pProcessName Set errMsg to "Max Time of " & pMaxTimeSec & " exceeded waiting for:" & LF & ¬ If ((startTime's timeIntervalSinceNow()) > pMaxTimeSec) then Repeat until window pWinTitle of process pProcessName exists Set startTime to current application's NSDate's |date|() On pauseUntilWin(pWinTitle, pProcessName, pMaxTimeSec) Set msgTitleStr to "Remap of Modifier Keys"ĭisplay dialog msgStr with title msgTitleStr Set msgStr to "CONTROL Key has been mapped to: " & newKeyMap Tell application "System Preferences" to quit Set newKeyMap to item numDown of - UP ArrowĮnd tell - pop up button "Control (⌃) Key:"Ĭlick button "OK" - on sheet 1 (modifier key list)Įnd tell - sheet 1 - (modifier key list) 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 Use smart pauseUntil handler rather than fixed delay time.I'm running macOS 10.11.6, so it might be different on Sierra. 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."
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |