Sign in to follow this  
Followers 0
neogia

Checking for inputbox activity

4 posts in this topic

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.


[center]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.[/center]

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

8)


NEWHeader1.png

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)
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

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  
Followers 0