Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Thu Apr 21, 2005 10:56 pm Post subject: |
|
|
A really basic solution is to use the default button to send a tab keystroke. The following example seems to work okay: | Code: | gui, add, edit
gui, add, edit
gui, add, edit
gui, add, checkbox,, Sample checkbox
gui, add, DropDownList
gui, add, slider
gui, add, button, default, Next
gui, show
return
ButtonNext:
Send {tab}
return
GuiClose:
ExitApp |
Alternatively, if this script will run only on Windows NT/2k/XP or later, the following script in which ~Enter is a hotkey also seems to work: | Code: | gui, add, edit
gui, add, edit
gui, add, edit
gui, add, checkbox,, Sample checkbox
gui, add, DropDownList
gui, add, slider
gui, add, button,, &OK
gui, show
return
ButtonOK:
GuiClose:
ExitApp
~Enter::
Gui +LastFound
IfWinNotActive
return
GuiControlGet, FocusedControl, Focus
if FocusedControl <> Button2
Send {tab}
return |
|
|