[AHK-] 熱鍵送出問題。這樣寫錯在哪?
我預期 按1送出b
按q送出p
按a送出m (暫時三個,以後會增加)
但失敗了,請幫我看下程式碼,謝謝。
;調用函式庫,下載網址與用法請見
;http://www.autohotkey.com/forum/topic14881.html
#Include AHKA.ahk
;創造兩個陣列
AHKA_SetDebug(false)
arrBoPoMo := "[1,q,a]"
arrPinyin := "[b,p,m]"
AHKA_SetDebug(true)
;改變鍵盤對應
SendKey(BoPoMo, Pinyin)
{
;紅字部份是我想要,但是失敗的程式碼
/*
Hotkey, %BoPoMo%, Pinyin
Pinyin:
Send %Pinyin%
Return
*/
MsgBox, %BoPoMo%
}
index = 1
Loop, 3
{
BoPoMo := AHKA_Get(arrBoPoMo, index) ;取得陣列項目值
Pinyin := AHKA_Get(arrPinyin, index)
SendKey(BoPoMo, Pinyin)
index := index + 1
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 58.114.192.127
→
04/15 22:40, , 1F
04/15 22:40, 1F
為什麼放在函式裡無效?有哪些指令不可以放在函式裡?
要怎麼改@@a
※ 編輯: shyangs 來自: 58.114.192.127 (04/15 22:56)
→
04/15 23:37, , 2F
04/15 23:37, 2F
→
04/15 23:39, , 3F
04/15 23:39, 3F
→
04/15 23:41, , 4F
04/15 23:41, 4F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):