Button wrote:The example above includes the word Default in its Options to make "OK" the default button. The default button's action is automatically triggered whenever the user presses ENTER, except when the keyboard focus is on a different button ...
That's not true if you switch the keyboard focus to another button using
Gui, Margin, 20, 20
Gui, Add, Text, , Press ENTER to trigger the focused button.
Gui, Add, Button, wp Default vBtnD gDefaultButton, Default
Gui, Add, Button, wp vBtnF gFocusedButton, Focused
GuiControl, Focus, BtnF
Gui, Show, , Test
MsgBox, %A_ThisLabel% was triggered!
This seems to be related to How to set focus in a dialog box and should be fixed, at least in v2.