Jump to content

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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")
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...