I have a GUI that when I load I want a certain button to be highlighted by default, so the user can quickly hit enter instead of having to mouse over.
Code: Select all
GuiHWND := WinExist()
Gui, add, ListBox, h600 w200 vLB gPopulate, % persons
Gui, add, Edit, x+10 hp w600 vtextbox ReadOnly
Gui, add, Button, x722 y605 w100 h25 gselect, Select
Gui, add, Button, x9 y605 w100 h25 gcancel, Cancel
Gui, show
Gui, -SysMenu
gosub, Populate
clipboard := clipsave
ClipWait 0.2
return