我想在AHK中創建一個多維數組。 callback
中的密鑰在Messages
陣列中。所有這些處理程序都由菜單執行。我在這裏將對象實例化爲數組:如何將密鑰添加到AutoHotkey中的多維數組中?
Application = { Messages: [] }
然後我要求用戶使用回調,即:規則。用戶然後向規則數組添加一條消息。
CreateMessageHandler:
InputBox callback, Create a message group., Choose a callback for this message., ,
if !ErrorLevel
InputBox message, Add a new sentence., Enter your line to store., ,
if !ErrorLevel
Application.Messages[callback].Insert(message)
MsgBox Bravo! Message added successfully.`n`nNote: You can use CTRL+D to quickly display these.
return
,將其輸出回調,我問他之前,把回調的用戶,然後通過郵件和輸出循環:
DisplayMessageHandler:
InputBox, callback, Display a set of messages., Enter which callback you want to display., ,
if !ErrorLevel
for key, value in Application.Messages[callback] {
send {Raw}%value%
send {Enter}
sleep, 1000
}
return
我收到沒有錯誤,我怎麼也想不到調試Application.Messages
,因爲它沒有將回調/消息保存到它。誰能幫我嗎?謝謝!
P.S - This is my reference to information/documentation.