Jump to content
Sign in to follow this  
Michel Claveau

Event / input modify

Recommended Posts

Hi, all !

With this code :

#include <GUIConstants.au3>

$mainwindow = GUICreate("Hello World of Test", 260, 120)
GUICtrlCreateLabel("input", 30, 43)
$input= GUICtrlCreateInput("Blabla", 60, 40, 160, 20)
GUICtrlCreateLabel("inpuu", 30, 73)
$inpuu= GUICtrlCreateInput("Blibli", 60, 70, 160, 20)
GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    if $msg=$input then OKinput()
    if $msg=$inpuu then OKinpuu()
    if $msg = $GUI_EVENT_CLOSE then exitloop
WEnd

Func OKinput()
  MsgBox(0, "GUI Event", "input")
EndFunc

Func OKinpuu()
  MsgBox(0, "GUI Event", "inpuu")
EndFunc

- Modify the first text ("Blabla" ; $input)

- Press [Tab] --> Nothing ! ! ! (we are, now, on $inpuu)

- wait few seconds

- Press any key --> Give event on... $input !???

How to have event when I exit from $input modified ?

Thanks by advance, and sorry for my bad english.

Share this post


Link to post
Share on other sites

Hi, all !

With this code :

#include <GUIConstants.au3>

$mainwindow = GUICreate("Hello World of Test", 260, 120)
GUICtrlCreateLabel("input", 30, 43)
$input= GUICtrlCreateInput("Blabla", 60, 40, 160, 20)
GUICtrlCreateLabel("inpuu", 30, 73)
$inpuu= GUICtrlCreateInput("Blibli", 60, 70, 160, 20)
GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    if $msg=$input then    OKinput()
    if $msg=$inpuu then    OKinpuu()
    if $msg = $GUI_EVENT_CLOSE then    exitloop
WEnd

Func OKinput()
  MsgBox(0, "GUI Event", "input")
EndFunc

Func OKinpuu()
  MsgBox(0, "GUI Event", "inpuu")
EndFunc

- Modify the first text ("Blabla" ; $input)

- Press [Tab]  -->  Nothing ! ! !  (we are, now, on $inpuu)

- wait few seconds

- Press any key  -->  Give event on... $input  !???

How to have event when I exit from $input modified ?

Thanks by advance, and sorry for my bad english.

<{POST_SNAPBACK}>

The input control fire event when the input is really terminated that's mean when you do an action on another control.

Usually you click on a button so you get the input event if a modification occured and the button event after.

That's the reason when you type in the $input control you get the notification as soon you type in the $inpuu but not before. There is no way to determine if the inputing in the control as ended.

I hope That's clarify the behavior. :(

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...