简体   繁体   English

在AutoHotKey中的Edit / UpDown好友中显示值

[英]Displaying value in an Edit/UpDown buddy in AutoHotKey

Is there anyway to get the textual chosen "word" to display in the spinner UI element as one flips through? 无论如何,当翻转时,是否有文本选择的“单词”显示在微调器UI元素中?

Whenever the user enters an up or down key the gosub display is called. 只要用户输入向上或向下键,就会调用gosub显示。 So far though i have found only ways to display the index not the value... 到目前为止,尽管我只找到了显示索引而不是显示值的方法...

#a::
words:= ["in","the","beginning","was","the","word"]

Gui, Add, Edit, w111 R1 vw, words3
Gui, Add, UpDown, w22 gdisplay vn Range1-6, 3

Gui, Show, x933 y0, test word display
return

display:
UD:=n
word:=words[UD]
n:=word
;Gui, Submit, NoHide
return

How about using a ListBox instead: 如何使用ListBox代替:

Gui, Add, ListBox, R1 vMyList -VScroll, in|the|beginning|was|the|command|line
Gui, Add, UpDown, gDisplay
Gui, Show, , test word display

Exit

Display:
    Gui, Submit, NoHide
    ; MsgBox % MyList
return

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM