Sign in to follow this  
Followers 0
Giuseppe

Press Enter on a GUI

4 posts in this topic

In a GUI with input controls and a button type "OK", if I modify the data into a control and then click on the button, the GUIGetMsg() generate a event for the control modified (where is possible to make some tests) and then the event for the button (for example, exit out the cicle).

If I press Enter and have defined a default action type "GUICtrlSetState($BottOK, $GUI_DEFBUTTON)", directly exit out the cicle, without generate the event for the modifies controls.

The first action is the right for the same situation realized, with mouse or keyboard.

Best regards, Giuseppe.

Share this post


Link to post
Share on other sites



I dont understand exactly... could you show some code for us to view the problem/question

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I did not get it either. You want to exit the application without trigging an event from the gui item you have clicked?

A code sample would probably be clarifying. :D

Share this post


Link to post
Share on other sites

You might be better removing the $DEFBUTTON, and instead use a HotKey for the {enter} action, something like...

HotKeySet("{Enter}" , "EnterExitCicle")

; ...

; Enter to exit cicle..
func EnterExitCicle()
    if WinActive($gui) then
        ExitCicle() ; replace with your own exit-cicle function name
    else
        HotKeySet("{Enter}")
        Send("{Enter}")
        HotKeySet("{Enter}" , "EnterExitCicle")
    endif
endfunc

but then, perhaps I misunderstood the question.

-mu

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