Tired of having to open system preferences/keyboard to toggle the default behavior of functions keys? Use this AppleScript with Quicksilver or Alfred to easily toggle the function keys between media and standard role.” 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
tell application "System Preferences"
set current pane to pane "com.apple.preference.keyboard"
end tell
tell application "System Events"
if UI elements enabled then
tell application process "System Preferences"
get properties
click radio button "Keyboard" of tab group 1 of window "Keyboard"
click checkbox "Use all F1, F2, etc. keys as standard function keys" of tab group 1 of window "Keyboard"
end tell
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
end tell
end if
end tell
tell application "System Preferences"
quit
end tell
Similarly, use this app-toggler AppleScript to toggle between Chrome and TextMate.
1 2 3 4 5 6 7 8 9 |
|
Now just assign a hotkey to the script file and the hotkey becomes a toggle button.
Got more tips to increase your productivity? Share via comments below.