emendelson Posted April 21, 2023 Posted April 21, 2023 I have a GUI with buttons labeled Yes and No. I think it should be obvious to me how to let the user press "Y" or "N" to activate the buttons, but I don't see how. Here is a fragment of my code, but I can't figure out how to make "Y/y" or "N/n" do the same thing as clicking the button. Can anyone show me what I should have figured out long ago? Local $doYes = GUICtrlCreateButton("Yes", 200, 5, 50) Local $doNo = GUICtrlCreateButton("No", 260, 5, 50) $doConvert = 0 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $doYes $doConvert = 1 ExitLoop Case $doNo $doConvert = 0 ExitLoop EndSwitch WEnd
Solution emendelson Posted April 21, 2023 Author Solution Posted April 21, 2023 (edited) And the answer to my question is GUISetAccelerators. Sorry to waste bandwidth. Edited April 21, 2023 by emendelson
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now