Sign in to follow this  
Followers 0
Johnco_uk

ENTER to trigger a button click ?

5 posts in this topic

Hello again,

I have created a GUI interface, which will take a login name, a password, and has two buttons which will execute another file passing login and password, however, I want to be able to let the user hit the enter key when finished typing the password into the password input text box, this enter button will execute the file instead of pressing the required button...

I have looked at HotKeys and I don't think that is the answer, although I am open to advice on that..

Is there a way to trigger the button press from the user hitting ENTER ??

thanks in advance..

:ph34r:


[font="Optima"]'The impossible I can do.. miracles take a little longer...[/font]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Activate $BS_DEFPUSHBUTTON in the default button style.

Edited by ezzetabi

Share this post


Link to post
Share on other sites

Activate $BS_DEFPUSHBUTTON in the default button style.

<{POST_SNAPBACK}>

thanks, works a treat :ph34r:

the force is strong in this one.....


[font="Optima"]'The impossible I can do.. miracles take a little longer...[/font]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Sorry to dredge up such an old topic, but, I note that when I have more than 1 button in the GUI, the one with '$BS_DEFPUSHBUTTON' no longer seems to be default after you press another button. The GUI seems to remember only the last button pressed.

How can one avoid that issue?

Note, none of the other buttons have '$BS_DEFPUSHBUTTON' defined for them.

Edited by zackrspv

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Share this post


Link to post
Share on other sites

Sorry to dredge up such an old topic, but, I note that when I have more than 1 button in the GUI, the one with '$BS_DEFPUSHBUTTON' no longer seems to be default after you press another button. The GUI seems to remember only the last button pressed.

How can one avoid that issue?

Note, none of the other buttons have '$BS_DEFPUSHBUTTON' defined for them.

I think you have to set focus back to the default button once another button has been pressed using ControlFocus or GuiCtrlSetState.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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