Je suis nouveau sur AppleScript, et j'essaye de créer un raccourci clavier pour basculer les touches Fn sur mon Logitech K750. J'utilise AutoCAD et j'en ai vraiment besoin.AppleScript K750 Toggle Fn Keys
J'ai commencé à essayer quelques codes, mais jusqu'à présent, aucun succès ... quelqu'un peut-il m'aider?
Voici le code ...
Merci !!!
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
Oups! Ensuite, essayez d'utiliser la syntaxe dans le gestionnaire de périphériques similaire à la syntaxe de mon script. D'abord pour rendre le script plus facile à lire, remplacez la description sur la case à cocher par un nombre (je suppose que = 1 basé sur votre copie d'écran). Aussi l'instruction 'click checkbox ...' doit être à l'intérieur d'un bloc "dire l'application" System Events "/ tell process" Device Manager "... (voir mon script). C'est ainsi que vous pouvez simuler des clics et d'autres actions de l'interface graphique via un script. La dernière remarque est que votre dialogue d'affichage ne devrait pas être dans le bloc tell manager, qui peut ne pas le supporter. il suffit de mettre le dialogue d'affichage après la fin dire. – pbell