怎么实现在输入框每输入一个字符能获取该字符?

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 怎么实现在输入框每输入一个字符能获取该字符?

Re: 怎么实现在输入框每输入一个字符能获取该字符?

Post by tmplinshi » 08 Jun 2015, 14:25

nepter 写的 AutoComplete:
http://www.autohotkey.com/board/topic/9 ... down-list/ (需翻墙)

Re: 怎么实现在输入框每输入一个字符能获取该字符?

Post by wo52616111 » 08 Jun 2015, 10:41

找到个WinGetText,可以结题了

怎么实现在输入框每输入一个字符能获取该字符?

Post by wo52616111 » 08 Jun 2015, 09:51

想实现每按一个字有相关提示,例如:输入a,然后有提示apple,all,and;再输入p,剩下提示apple。
现在首先获取输入的那个字都成问题。
先想到用"v"变量vChar,把字符存到“Char”变量,但是得Gui Submit之后才能获取,submit后gui也消失了。
然后就是想到

Code: Select all


    getChar:
    ClipboardOld:=ClipboardAll
    Clipboard:=
    SendInput, +{Left}^c
    ClipWait, 0.1
    SendInput, ^v
    MsgBox, %Clipboard%
    Clipboard:=ClipboardOld
    return 
功能可以实现,但是不理想,会多次复制粘贴,然后在输入栏上看起来就一直闪烁,不明白为啥会这样。

Top