請問怎麼在applescript裡面使用按鍵偵測 - MAC
By Bennie
at 2013-10-01T02:07
at 2013-10-01T02:07
Table of Contents
各位大大好,我想用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
請問要怎麼寫或是用什麼軟體可以達成呢?
--
Tags:
MAC
All Comments
By Olive
at 2013-10-05T01:14
at 2013-10-05T01:14
By Victoria
at 2013-10-08T12:38
at 2013-10-08T12:38
By Victoria
at 2013-10-09T16:38
at 2013-10-09T16:38
By Queena
at 2013-10-13T17:37
at 2013-10-13T17:37
By Regina
at 2013-10-15T11:46
at 2013-10-15T11:46
By Daph Bay
at 2013-10-15T17:08
at 2013-10-15T17:08
Related Posts
想請問關於MBA日版鍵盤的問題
By Linda
at 2013-10-01T01:49
at 2013-10-01T01:49
Apple官網 & OS X Maverics
By Kelly
at 2013-10-01T00:39
at 2013-10-01T00:39
60W的舊型Magsafe那裏可以買的到
By James
at 2013-10-01T00:36
at 2013-10-01T00:36
商業佈告欄 2013/10
By Oscar
at 2013-10-01T00:03
at 2013-10-01T00:03
為什麼iTunes這麼神奇?
By Elizabeth
at 2013-09-30T22:10
at 2013-09-30T22:10