Variables 你能告诉我传递值的正确方法吗?(数组到
我不明白它为什么不能正确传递值。输出应为word2Variables 你能告诉我传递值的正确方法吗?(数组到,variables,autohotkey,Variables,Autohotkey,我不明白它为什么不能正确传递值。输出应为word2 f12:: target = 1 string := "word1|word2|word3" S_Array := StrSplit(string, "|") string output = S_Array[target] MsgBox % "Output:" output return 当我使用 MsgBox % "Output:" S_Array[target] 取而代之的是,一切都很好
f12::
target = 1
string := "word1|word2|word3"
S_Array := StrSplit(string, "|")
string output = S_Array[target]
MsgBox % "Output:" output
return
当我使用
MsgBox % "Output:" S_Array[target]
取而代之的是,一切都很好。但我需要将其存储到输出。我正在尝试很长一段时间。您必须熟悉AutoHotkey的“表达式样式”,这相当脏/混乱
而且,AutoHotkey的索引是基于一的而不是基于零的,同样令人困惑
最后,在自动热键中不需要“键入”关键字
而不是:
字符串输出=S\u数组[目标]
您是否尝试过:output:=S\u数组[目标]
此外,您可能还想阅读: