Jump to content
Sign in to follow this  

Checking for inputbox activity

Recommended Posts


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

Share this post

Link to post
Share on other sites

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.

Share this post

Link to post
Share on other sites

the input has a limit of chractors or guisetlimit...

you could try

If $msg = $input Then



Share this post

Link to post
Share on other sites

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)
While 1
    $MSG_2 = GUIGetMsg()
    $NAME_INPUT = GUICtrlRead($INPUT_1)
    If StringLen($NAME_INPUT) = 4 Then
        MsgBox(0, "", "you entered  4 digits")

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.