各位大大好,我想用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
請問要怎麼寫或是用什麼軟體可以達成呢?
--
只是上網搜尋不到如何在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
請問要怎麼寫或是用什麼軟體可以達成呢?
--
All Comments