Jump to content

ENTER to trigger a button click ?


Johnco_uk
 Share

Recommended Posts

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]

Link to comment
Share on other sites

  • 3 years later...

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ë 맧ëñ§ë øƒ !ïƒë.

Link to comment
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.
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
 Share

  • Recently Browsing   0 members

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