[求救] 請問怎麼在applescript裡面使用按鍵偵測
各位大大好,我想用applescript寫出類似autohotkey的功能(要拿來玩暗黑三冰法)
只是上網搜尋不到如何在if後面添加按鍵觸發
這是目前我寫出來測試的:
tell application "TextEdit"
activate
end tell
tell application "System Events"
repeat while 4 is 4
tell process "TextEdit"
set frontmost to true
end tell
keystroke "w"
delay 0.01
keystroke "e"
delay 0.01
keystroke "r"
delay 0.3
end repeat
end tell
然後我想要達到當按下空白鍵時,電腦自動重複按WER
請問要怎麼寫或是用什麼軟體可以達成呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.240.127.254
→
10/01 08:23, , 1F
10/01 08:23, 1F
→
10/01 12:16, , 2F
10/01 12:16, 2F
→
10/01 12:16, , 3F
10/01 12:16, 3F
→
10/01 20:17, , 4F
10/01 20:17, 4F
→
10/01 20:18, , 5F
10/01 20:18, 5F
→
10/01 20:19, , 6F
10/01 20:19, 6F
→
10/01 23:14, , 7F
10/01 23:14, 7F