0

私は AppleScript が初めてで、Logitech K750 で Fn キーを切り替えるキーボード ショートカットを作成しようとしています。AutoCAD を使用していますが、本当に必要です。

いくつかのコードを試してみましたが、今のところ成功していません...誰か助けてくれませんか?

これがコードです...

ありがとうございました!!!

tell application "Device Manager" activate end tell tell application "Device Manager" get every attribute of checkbox "When this box is checked, press F1, F2, etc. keys to use the standard function keys, and press and hold the Fn key to use the enhanced functions printed on the keys." of window "Wireless Solar Keyboard K750 for Mac" click checkbox "When this box is checked, press F1, F2, etc. keys to use the standard function keys, and press and hold the Fn key to use the enhanced functions printed on the keys." of window "Wireless Solar Keyboard K750 for Mac" activate if value of checkbox "When this box is checked, press F1, F2, etc. keys to use the standard function keys, and press and hold the Fn key to use the enhanced functions printed on the keys." of window "Wireless Solar Keyboard K750 for Mac" = 0 then display dialog "Standard Function Keys off..." giving up after 1 else display dialog "Standard Function Keys on..." giving up after 1 end if end tell tell application "Device Manager" quit end tell

4

3 に答える 3

0

このスクリプトは、ファンクション キーのチェックボックスをクリックします。

ElCapitain (10.11) でテスト済みで問題ありません。

tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.keyboard"
reveal anchor "keyboardTab" of current pane
end tell
delay 0.5 -- to make sure system has time to open the window !
tell application "System Events"
tell application process "System Preferences" to click checkbox 1 of tab group 1 of front window
end tell
tell application "System Preferences" to close front window

警告 : GUI スクリプトは、現在のシステム バージョンに依存します。Apple が次の OS バージョンで環境設定ペインのレイアウトを変更した場合、このスクリプトは機能しなくなる可能性があります。

于 2016-04-08T05:21:10.577 に答える