Using Applescript to Execute a Complicated Keystroke

前端 未结 2 1874
南方客
南方客 2020-12-31 01:12

I\'m trying to write an Applescript in Automator that will press the left arrow button while holding down control, option, and command. The code I have so far is:



        
2条回答
  •  礼貌的吻别
    2020-12-31 01:42

    You can use any ASCII code, for the arrow keys this will be:

    tell application "System Events" to keystroke (ASCII character 31) --down arrow

    tell application "System Events" to keystroke (ASCII character 30) --up arrow

    tell application "System Events" to keystroke (ASCII character 29) --right arrow

    tell application "System Events" to keystroke (ASCII character 28) --left arrow

    Links:

    • Credits

    • ASCII CODES

提交回复
热议问题