neogia Posted February 13, 2006 Posted February 13, 2006 Is it possible to call a function when a letter is entered into an input box? The usage I'm looking for is when they enter x characters, I want a green label to appear showing them that the input is of the right length. Only problem is: $input = GUICtrlCreateInput("",10,30) ... If $msg == $input Then ... the GUI message, "$input" only gets called when you change the letters and the input box loses focus. Any other ideas? Thanks. [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia
Moderators SmOke_N Posted February 13, 2006 Moderators Posted February 13, 2006 My suggestion would be to make your own InputBox() using a GUI, for this to work. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Valuater Posted February 13, 2006 Posted February 13, 2006 the input has a limit of chractors or guisetlimit... you could try If $msg = $input Then 8)
pecloe Posted February 13, 2006 Posted February 13, 2006 quick and dirty, maybe it'll give you some ideas #include <GuiConstants.au3> ;#include <Ispressed.au3> ;#include <Sound.au3>;;;see examples-notes ;Opt("TrayIconDebug", 1) ;************ NOTES START ************ ;************ NOTES END ************** GUICreate("", 460, 300, -1, -1) GUISetBkColor(0xadd8e6);;; lightblue GUISetFont(11, 690) $INPUT_1 = GUICtrlCreateInput("", 110, 150, 132, 25) GUISetState() While 1 $MSG_2 = GUIGetMsg() $NAME_INPUT = GUICtrlRead($INPUT_1) If StringLen($NAME_INPUT) = 4 Then MsgBox(0, "", "you entered 4 digits") Exit EndIf WEnd
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now